Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hex break down of the binary file [Solved]

 
martin naughton
Ranch Hand
Posts: 30
Debian MyEclipse IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,
Just a really simple question that probably will not affect my programming in any way. I was looking at the binary file using a hex editor an i noticed there was a break between characters that did not make any sense of what the hex would be used for.

After size in the picture there is a 00 04 hex that does not make what it could be used for.

Also after smoking there is a 00 01. Not sure what it means.

Also after rate there is a 00 08.

Does anyone know what these value means in the binary file or should i just ignore them?

thanks

Also i have used that java class that lets you look a you binary file in a string format.

binary_breakup1.jpg
[Thumbnail for binary_breakup1.jpg]
00 08 space
binary_breakup.jpg
[Thumbnail for binary_breakup.jpg]
00 04 space
 
Jianping Wang
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Do you really mean the SCJD data file? if so then you can search for article on how to get data according to data schema defined in requirements.

My code is ugly but works


It will give you some thing like

MAGIC VALUE: 257
LENGTH OF RECORD: 159
NUMBER OF FIELD: 7
Delete name location size smoking rate date owner
[0] [Palace ] [Smallville ] [2 ] [Y] [$150.00 ] [2005/07/27] [ ]
[0] [Castle ] [Smallville ] [6 ] [Y] [$220.00 ] [2005/11/19] [ ]
[0] [Excelsior ] [Smallville ] [4 ] [Y] [$230.00 ] [2003/02/05] [ ]


I use square box to show you the actual field area.
 
martin naughton
Ranch Hand
Posts: 30
Debian MyEclipse IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.

Sorry for the question. I just figured out that they are the field length for each field.
 
Carlos Morillo
Ranch Hand
Posts: 221
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Martin,

Please check the SCJD Forum FAQ and look for Roberto Perillo's Database file reader.

HTH,

Carlos.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic