09-04-2014 12:42 PM
String fileStr = reader.getContentString();
byte[] fileBin = fileStr.getBytes("US-ASCII");
String fileB64 = DatatypeConverter.printBase64Binary(fileBin);
soapBodyFileContents.addTextNode(fileB64);
<file>
<FileContents>JVBERi0xLjQKJT8/Pz8NCjEgMCBvYmoKPDwgCi9UeXB…</FileContents>
</file>
<file>
<FileContents>JVBERi0xLjQKJeLjz9MNCjEgMCBvYmoKPDwgCi9UeXB…</FileContents>
</file>
09-04-2014 02:44 PM
09-08-2014 11:45 AM
09-08-2014 10:15 PM
// read from the stream into a byte[]
InputStream is = getContentInputStream();
ByteArrayOutputStream os = new ByteArrayOutputStream();
org.springframework.util.FileCopyUtils.copy(is, os);
byte[] bytes = os.toByteArray();
//encode it using base64 encoder.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.