Hi,
I've written a function to convert a java.io.ByteArrayOutputStream to a Memorystream and it works. As:
Code:
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;
}
Now I want to go the other way i.e. MemoryStream to java.io.ByteArrayOutputStream and I can't .
Any suggestions?
Angkar