SUB SendByteArray(ByteArray() as Byte)
Dim Blob(ByteArray.Length) As Byte
Dim bc As ByteConverter
bc.LittleEndian = True 'convert to little endian
bc.ArrayCopy(ByteArray, 0, Blob, 0, FileSize)
Dim In As InputStream 'create an input stream from which to read
In.InitializeFromBytesArray(Blob, 0, Blob.Length)
Astreams.Writestream(In, Blob.Length) 'Send the byte array containing the image
...