|
||||||||||
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(javax.activation.DataHandler dh,
int limit)
The method checks to see if attachment is eligble for optimization. |
static long |
inputStream2BAAOutputStream(java.io.InputStream is,
BAAOutputStream baaos,
long limit)
inputStream2BAAOutputStream |
static boolean |
inputStream2FileOutputStream(java.io.InputStream is,
java.io.FileOutputStream fos)
Opimized writing to FileOutputStream using a channel |
static void |
inputStream2OutputStream(java.io.InputStream is,
java.io.OutputStream os)
Private utility to write the InputStream contents to the OutputStream. |
static int |
inputStream2OutputStream(java.io.InputStream is,
java.io.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(java.io.InputStream is, java.io.OutputStream os) throws java.io.IOException
is
- os
-
java.io.IOException
public static int inputStream2OutputStream(java.io.InputStream is, java.io.OutputStream os, int limit) throws java.io.IOException
is
- InputStreamos
- OutputStreamlimit
- maximum number of bytes to read
java.io.IOException
public static boolean inputStream2FileOutputStream(java.io.InputStream is, java.io.FileOutputStream fos) throws java.io.IOException
is
- fos
-
java.io.IOException
public static long inputStream2BAAOutputStream(java.io.InputStream is, BAAOutputStream baaos, long limit) throws java.io.IOException
is
- baaos
- limit
-
java.io.IOException
public static int doesDataHandlerExceedLimit(javax.activation.DataHandler dh, int limit)
in
-
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |