Tech Support > Computers & Technology > Programming > can java 2 read bits of information?
can java 2 read bits of information?
Posted by Moerderin on July 9th, 2004


I understand that java 2 can read bytes, and then it can also write a
new file writing just those bytes, but i need java to go farther than
that. i have to write a program that reads bits catagorized into
groups of information then store it in a database using "pointers"

ie

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10| 11| 12| 13| 14| 15| 16|
| Temperature | Thermometer reading in centegrades|therm. name|


thats just an example i made up right now, so how would i have a java
program read bits 1-4 store the info somewhere, then read bits 5-13
and store it somewhere else, and so on and so forth. if anyone has
previously written coding for this type of task or has any wonderful
ideas on how to accomplish it i would be much appreciated. thnx.

Posted by Antoun Kanawati on July 9th, 2004


Moerderin wrote:

Java has bitwise operators, and well defined semantics for them.
So, you can encode and decode bits into integers.



Similar Posts