public class TextHelper extends Object
| Constructor and Description |
|---|
TextHelper() |
| Modifier and Type | Method and Description |
|---|---|
static OMText |
toOMText(byte[] b,
int off,
int length,
OMFactory factory,
boolean isOptimize)
Create an OMText node from a byte array containing binary data
If the byte array is large and the optimize flag is set, then
the data is stored in a temp file to reduce in-core memory
|
static OMText |
toOMText(byte[] b,
int off,
int length,
OMFactory factory,
boolean isOptimize,
String attachmentDir)
Create an OMText node from a byte array containing binary data
If the byte array is large and the optimize flag is set, then
the data is stored in a temp file to reduce in-core memory
|
static String |
toString(InputStream inStream) |
static void |
toStringBuffer(InputStream inStream,
StringBuffer buffer)
Append Base64 encoding of the data in the inStream to the specified buffer
|
static void |
toStringBuffer(OMText omText,
StringBuffer buffer)
Append data in the omText to the specified buffer
|
public static String toString(InputStream inStream) throws IOException
inStream - InputStreamIOExceptionpublic static void toStringBuffer(InputStream inStream, StringBuffer buffer) throws IOException
inStream - InputStreambuffer - BufferIOExceptionpublic static void toStringBuffer(OMText omText, StringBuffer buffer) throws IOException
omText - the text node to get the character data frombuffer - BufferIOExceptionpublic static OMText toOMText(byte[] b, int off, int length, OMFactory factory, boolean isOptimize) throws IOException, javax.mail.MessagingException
b - off - length - factory - isOptimize - IOExceptionjavax.mail.MessagingExceptionpublic static OMText toOMText(byte[] b, int off, int length, OMFactory factory, boolean isOptimize, String attachmentDir) throws IOException, javax.mail.MessagingException
b - off - length - factory - isOptimize - attachmentDir - IOExceptionjavax.mail.MessagingExceptionCopyright © 2004–2016 The Apache Software Foundation. All rights reserved.