Sunday, 15 August 2010

Understanding hex dump of a file generated by Java? -



Understanding hex dump of a file generated by Java? -

here code:

file file = new file("test.txt"); file.createnewfile(); outputstream outputstream = new fileoutputstream(file); outputstream.write(65); outputstream.write(66); outputstream.flush(); outputstream.close();

when open test.txt in text editor see

ab

which utf-8 characters values 65 , 66.

i take hex dump of file , see:

file owner: koraytugay grouping owner: staff file size: 2 bytes file creation date: 2014-11-04 13:18:45 +0000 file modification date: 2014-11-04 13:19:01 +0000 hex dump: [] 41 42 ab

so [] 41 42 supposed mean here? why not 65 , 66?

the decimal number 65 is 41 hexadecimal.

the decimal number 66 is 42 hexadecimal.

java hex hexdump

No comments:

Post a Comment