Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Byte Array to IO.Stream

Status
Not open for further replies.

benvegiard

Programmer
May 15, 2003
63
US
Hi All,

I am trying to move data from a populated byte array (MyData) to an io.stream data type using the following code (k is a long variable containing the length of the byte array):

Dim s As Stream
s.Write(MyData, 0, K)

Whenever I attempt to access s (in this case, the s.Write statement) I receive an "Instance of object reference not set" message. I have played around with streamwriter, etc, but to no avail. I am sure this has something to do with .Net wanting us to derive from io.stream, but I cannot quite make that jump in my mind. Ultimately, I want to move the data into an image object from the stream:

image.fromstream(s)

Does anyone have any clues for me?

Thanks!
 
This class does not have a public constructor, or, at least I couldn't find it :).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top