public class BufferUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BUFFER_LEN |
| Constructor and Description |
|---|
BufferUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
doesDataHandlerExceedLimit(javax.activation.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) |
public static final int BUFFER_LEN
public static void inputStream2OutputStream(InputStream is, OutputStream os) throws IOException
is - os - IOExceptionpublic static int inputStream2OutputStream(InputStream is, OutputStream os, int limit) throws IOException
is - InputStreamos - OutputStreamlimit - maximum number of bytes to readIOExceptionpublic static boolean inputStream2FileOutputStream(InputStream is, FileOutputStream fos) throws IOException
is - fos - IOExceptionpublic static long inputStream2BAAOutputStream(InputStream is, BAAOutputStream baaos, long limit) throws IOException
is - baaos - limit - IOExceptionpublic static int doesDataHandlerExceedLimit(javax.activation.DataHandler dh,
int limit)
dh - limit - Copyright © The Apache Software Foundation. All Rights Reserved.