|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.axiom.attachments.impl.BufferUtils
public class BufferUtils
Attachment processing uses a lot of buffers. The BufferUtils class attempts to reuse buffers to prevent excessive GarbageCollection
| Field Summary | |
|---|---|
static int |
BUFFER_LEN
|
| Constructor Summary | |
|---|---|
BufferUtils()
|
|
| Method Summary | |
|---|---|
static int |
doesDataHandlerExceedLimit(DataHandler dh,
int limit)
The method checks to see if attachment is eligble for optimization. |
static long |
inputStream2BAAOutputStream(InputStream is,
BAAOutputStream baaos,
long limit)
inputStream2BAAOutputStream |
static boolean |
inputStream2FileOutputStream(InputStream is,
FileOutputStream fos)
Opimized writing to FileOutputStream using a channel |
static void |
inputStream2OutputStream(InputStream is,
OutputStream os)
Private utility to write the InputStream contents to the OutputStream. |
static int |
inputStream2OutputStream(InputStream is,
OutputStream os,
int limit)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BUFFER_LEN
| Constructor Detail |
|---|
public BufferUtils()
| Method Detail |
|---|
public static void inputStream2OutputStream(InputStream is,
OutputStream os)
throws IOException
is - os -
IOException
public static int inputStream2OutputStream(InputStream is,
OutputStream os,
int limit)
throws IOException
is - InputStreamos - OutputStreamlimit - maximum number of bytes to read
IOException
public static boolean inputStream2FileOutputStream(InputStream is,
FileOutputStream fos)
throws IOException
is - fos -
IOException
public static long inputStream2BAAOutputStream(InputStream is,
BAAOutputStream baaos,
long limit)
throws IOException
is - baaos - limit -
IOException
public static int doesDataHandlerExceedLimit(DataHandler dh,
int limit)
dh - limit -
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||