Hi,
I've written a function to convert a java.io.ByteArrayOutputStream to a Memorystream and it works. As:
Now I want to go the other way i.e. MemoryStream to java.io.ByteArrayOutputStream and I can'tCode:public MemoryStream baosToStream(java.io.ByteArrayOutputStream baos) { sbyte[] buff = baos.toByteArray(); byte[] outputBuff = new byte[buff.Length]; for (int index = 0; index < buff.Length; index++) { outputBuff[index] = (byte)buff[index]; } MemoryStream ms = new MemoryStream(outputBuff); return ms; }.
Any suggestions?
Angkar



LinkBack URL
About LinkBacks
.


