Package org.apache.axiom.om.util
Class TextHelper
java.lang.Object
org.apache.axiom.om.util.TextHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OMTextCreate 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 memorystatic OMTexttoOMText(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 memorystatic StringtoString(InputStream inStream) static voidtoStringBuffer(InputStream inStream, StringBuffer buffer) Append Base64 encoding of the data in the inStream to the specified bufferstatic voidtoStringBuffer(OMText omText, StringBuffer buffer) Append data in the omText to the specified buffer
-
Constructor Details
-
TextHelper
public TextHelper()
-
-
Method Details
-
toString
- Parameters:
inStream- InputStream- Returns:
- Base64 encoded string representint the data in inStream
- Throws:
IOException
-
toStringBuffer
Append Base64 encoding of the data in the inStream to the specified buffer- Parameters:
inStream- InputStreambuffer- Buffer- Throws:
IOException
-
toStringBuffer
Append data in the omText to the specified buffer- Parameters:
omText- the text node to get the character data frombuffer- Buffer- Throws:
IOException
-
toOMText
public static OMText toOMText(byte[] b, int off, int length, OMFactory factory, boolean isOptimize) throws IOException, javax.mail.MessagingException 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- Parameters:
b-off-length-factory-isOptimize-- Throws:
IOExceptionjavax.mail.MessagingException
-
toOMText
public static OMText toOMText(byte[] b, int off, int length, OMFactory factory, boolean isOptimize, String attachmentDir) throws IOException, javax.mail.MessagingException 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- Parameters:
b-off-length-factory-isOptimize-attachmentDir-- Throws:
IOExceptionjavax.mail.MessagingException
-