hi,
im trying to write a HEX editor in java. I can read the contents of a file fine, but I really need to read every single piece of the file, including headers etc..
would appreciate any help
thanks!
Printable View
hi,
im trying to write a HEX editor in java. I can read the contents of a file fine, but I really need to read every single piece of the file, including headers etc..
would appreciate any help
thanks!
Where are the parts of the file that you don't read? If you read all of the file's contents, where is there more to be read?Quote:
I can read the contents of a file fine
Are you referring to other info that is in the directory that describes the file like its date last modified?
if I have a text file that contains just the string "abc123" and I read it using inputStreamReader for instance, and then write it to the screen, it will display just "abc123". no other part of the file is read, no headers etc..
What is a "header" for a text file?
If the file contains only "abc123" and possible lineend char(s) what other part of the file is there to read?
What OS are you on? Does it save meta or OS data as well as the file's contents with a file on disk?
Do you mean the BOM for example, that you can see in a hex editor?
Looking at the spec for InputStreamReader it has to do translation from byte to char, so it has to read the BOM before it can start translating, for example.
Have you tried plain old FileInputStream? A hex editor shouldn't be assuming the data is characters.