BufferedInputStream to Byte Array
Does Anybody know how to convert a BufferedInputStream into Byte array byte[]?
I did this but It doesn't work, take a look.
private byte[] Convert(BufferedInputStream oStream) throws IOException {
byte[] bytesLeidos = new byte[0];
int longitudBytes = oStream.read(bytesLeidos);
return bytesLeidos;
}
I used the read method from FilterInputStream which returns the lenght of the byte array, but also stores the byte array in a buffer, in this case "bytesLeidos". It appears easy to work but it doesn't work. Please help.

