ConverterUtil#getStringFromDataHandler chops up the data into 1K chunks
-----------------------------------------------------------------------
Key: AXIS2-714
URL: http://issues.apache.org/jira/browse/AXIS2-714
Project: Apache Axis 2.0 (Axis2)
Type: Bug
Reporter: Davanum Srinivas
Several decoders don't like it. especially XmlBeans. Better to use the
following (tested and works)
public static String getStringFromDatahandler(DataHandler dataHandler){
try {
InputStream inStream;
inStream = dataHandler.getDataSource().getInputStream();
byte[] data = IOUtils.getStreamAsByteArray(inStream);
return Base64.encode(data);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira