I am learning how to read and write files. Text files were easy, but binary
files have me confused. As per the tutorial, I used BinaryReader to read a
file and put the contents into a ByteArray:
Dim fsReadStream As New FileStream(MyFi leName, FileMode.Open,
FileAccess.Read )
Dim brReader As New BinaryReader(fs ReadStream)
Dim ByteArray() As Byte
While brReader.PeekCh ar() -1
ByteArray = brReader.ReadBy tes(1)
' This is the part where I don't know how to do
End While
brReader.Close( )
How do I actually use the data in that ByteArray. I have basically created
a file containing some text, some images and some video (I plan to encrypt
this later). Now I want to open the file and read it, then parse it, put
the text into a label, put the image into a picturebox etc. Any tutorials
you can point me to, or any information at all will be useful.
Thanx,
--
Anil Gupte
www.icinema.com
files have me confused. As per the tutorial, I used BinaryReader to read a
file and put the contents into a ByteArray:
Dim fsReadStream As New FileStream(MyFi leName, FileMode.Open,
FileAccess.Read )
Dim brReader As New BinaryReader(fs ReadStream)
Dim ByteArray() As Byte
While brReader.PeekCh ar() -1
ByteArray = brReader.ReadBy tes(1)
' This is the part where I don't know how to do
End While
brReader.Close( )
How do I actually use the data in that ByteArray. I have basically created
a file containing some text, some images and some video (I plan to encrypt
this later). Now I want to open the file and read it, then parse it, put
the text into a label, put the image into a picturebox etc. Any tutorials
you can point me to, or any information at all will be useful.
Thanx,
--
Anil Gupte
www.icinema.com
Comment