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

Can't understand Schema Description of B&S

 
Steve Taiwan
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the following content
****************
Schema description section.
Repeated for each field in a record:
1 byte numeric, length in bytes of field name
n bytes (defined by previous entry), field name
1 byte numeric, field length in bytes
end of repeating block
****************
And I can't understand what "1 byte numeric, field length in bytes" means.
Could anyone tell me what it means?
Thank you.
 
Raj Nagappan
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Repeated for each field in a record:
1 byte numeric, length in bytes of field name
n bytes (defined by previous entry), field name
1 byte numeric, field length in bytes
end of repeating block


It means that there is:
(1) one byte of data which is a number, that tells you how many letters will follow in the field name
(2) the field name itself that occupies the number of bytes in (1) above
(3) another one byte which is a number, but this time tell you how many bytes there in the field storage.

eg. 5flags9 translates to:
(1) 5 bytes to follow in the fieldname
(2) fieldname = "flags", length = 5 (from 1 above)
(3) 9 bytes of data for this field in each record
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good explanation. It should be understood that the 5 and 9 in '5flags9' are the numbers 0x05 and 0x09, rather than 5 and 9 in ASCII, however.

Jules
 
Steve Taiwan
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Raj Nagappan

Thank you for the explanation.
I got it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic