Storing data in binary files
807599Dec 15 2006 — edited Dec 15 2006I am trying to store my data in binary files to save space and lessen time spent on hard disk reads. However, I can't seem to find the proper way to do this in java.
For example, I have the integer 65535 in java. How do I convert it into a 2 byte string FF FF in java?
When I read 2 bytes FF FF to a string from a binary file, how do I interpret it as a -32767 or a 65535 ?
Sorry if this seems like a really obvious question. None of the integer or string methods in java seems to do what I want :(