question about reading from/writing to a stream

Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Sep 2007
Posts: 56
Reputation: curt22 is an unknown quantity at this point 
Solved Threads: 0
curt22 curt22 is offline Offline
Junior Poster in Training

question about reading from/writing to a stream

 
0
  #1
Aug 30th, 2008
I'm writing a class that does a lot of reading and writing from a stream It needs to write bytes, sbytes, and signed or unsigned int32 and 16. I have been having trouble finding ways to read/write evrything I need to.
UInt16 and UInt32 were easy
when i looked for a way to read a byte I found the method readbyte, but it returns an int not a byte (I could cast it, but would that work?)
Then I got to Int16,Int 32 and sbyte and couldn't find any way to read signed bytes.
Could Somebody Help me with this.
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 56
Reputation: curt22 is an unknown quantity at this point 
Solved Threads: 0
curt22 curt22 is offline Offline
Junior Poster in Training

Re: question about reading from/writing to a stream

 
0
  #2
Aug 30th, 2008
I was looking on google again and found the classes BinaryReader/Writer and I think I can get it working that way. I guess I should have looked a little longer.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC