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
- IOException
public static int inputStream2OutputStream(InputStream is, OutputStream os, int limit) throws IOException
is
- InputStreamos
- OutputStreamlimit
- maximum number of bytes to readIOException
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(javax.activation.DataHandler dh, int limit)
dh
- limit
- IOException
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.