TextHelper is upgraded to include a utility method that creates an OMText from
a byte
--------------------------------------------------------------------------------------
Key: WSCOMMONS-347
URL: https://issues.apache.org/jira/browse/WSCOMMONS-347
Project: WS-Commons
Issue Type: Improvement
Reporter: Rich Scheuerle
Assignee: Rich Scheuerle
Scenario:
I want to create a OMText element from a binary byte[] array. If the byte[] is
large, I want axiom to use a DataHandler and backing file. But if the byte[]
is small, I want
axiom to use an in-core string.
Solution:
Add another utility method to the TextHelper code:
/**
* 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
* @param is
* @param factory
* @param isOptimize
*/
public static OMText toOMText(byte[] b, int off, int length,
OMFactory factory,
boolean isOptimize,
String attachmentDir) throws IOException,
MessagingException;
I am currently running tests, I will commit the code today.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.