We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ByteArrayOutputStream to InputStreamReader

I'm saving my Document to an ByteArrayOutputStream as SaveFromat.DOC which i convert to an byte[].

byte[] docDE .......

I'm trying to do it like the example at the bottom, but now I have to know the Charset of the Stream.

Can you hel me? What i would like to do, is to save my Document as CLOB on a Oracle DB.
So i have to convert my ByteStream in a CharStream.

ByteArrayInputStream is = new ByteArrayInputStream(docDe);
StringBuffer buffer = new StringBuffer();
//InputStreamReader isr = new InputStreamReader(is, "UTF-8");
//InputStreamReader isr = new InputStreamReader(is, "Windows-1252");
InputStreamReader isr = new InputStreamReader(is, "ISO-8859-1");
Reader reader = new BufferedReader(isr);
int ch;
while ((ch = reader.read()) > -1) {

Hi Michael,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Maybe in your case it is better to use RTF format, which is actually plain text. In this case encoding is UTF8.

Or maybe you can just save document as BLOB. In this case you can use binary data.

Best regards.