Dim out As OutputStream
out.InitializeToBytesArray(0)
Dim inp As InputStream = j.GetInputStream
Dim buffer(1024) As Byte
Dim count As Int
count = inp.ReadBytes(buffer, 0, buffer.length)
Log("this read: " & count & " bytes")
Do While count > -1
out.WriteBytes( buffer, 0, count )
count = inp.ReadBytes(buffer, 0, buffer.length)
Log("this read: " & count & " bytes")
Loop
Dim gopro() As Byte = out.ToBytesArray
out.Close
j.Release
Log(gopro.Length & " raw bytes")