java - InputStream reading trouble -


i have following problem: have read inputstream sequence of data due own arrangement need read first 4 bytes unsigned short (16 bits) in way read 2 blocks of 2 bytes because meaning of bytes numbers after need read unsigned byte because meaning of remaining data ascii.

someone advice me on how accomplish that?

you can use java's own datainputstream. can read first 4 bytes using readint, rest using readbyte... see http://download.oracle.com/javase/6/docs/api/java/io/datainputstream.html


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -