Writing/Reading Bits
From: Alex Power (powera_at_iastate.edu)
Date: 01/27/04
- Next message: Chris Smith: "Re: No answer for your problem ?"
- Previous message: Chris Smith: "Re: / and \"
- Next in thread: Chris Smith: "Re: Writing/Reading Bits"
- Reply: Chris Smith: "Re: Writing/Reading Bits"
- Reply: Knute Johnson: "Re: Writing/Reading Bits"
- Reply: Alex Power: "Re: Writing/Reading Bits"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 27 Jan 2004 12:05:23 -0600
Hi --
I am working on a project that needs to write data to a file in a specific
pattern. I have two arguments: a number from 0-15, and a long. I need to
write the first number in 4 bits, and then the last 20 bits of the long
(the first bits should be zero, but not necessarily). I also need to be
able to read these 3-bit sets. InputStream and OutputStream only read
bytes, and I cannot convert it to a BitSet. Memory space is important, so
simply writing the full long is not an option.
Alex Power
- Next message: Chris Smith: "Re: No answer for your problem ?"
- Previous message: Chris Smith: "Re: / and \"
- Next in thread: Chris Smith: "Re: Writing/Reading Bits"
- Reply: Chris Smith: "Re: Writing/Reading Bits"
- Reply: Knute Johnson: "Re: Writing/Reading Bits"
- Reply: Alex Power: "Re: Writing/Reading Bits"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|