• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: Confused about data format

 
Andrew Symantec
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello every,
I've just received my contractor assignment yesterday. I am already confused by the data format in the .db file
In the Data file format section, the instruction file states:
4 byte numeric,
2 byte numeric,
and it says the header informatin use the formats of DataInputStream class.
Is this means the 4 byte mumeric is written by
writeInt() method and we should use readInt() method to read it?
If this is the case, how about the 2 byte numeric? Or should I just read them use readByte() method?
Please help me clarify this.
Thank you!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to write use writeByte()
to read, use the read method that accepts a Byte[] as its parameter.
Mark
 
Andrew Symantec
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That helps a lot.
Thanks Mark.
 
Chunsheng Yu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To 2 numberic, you can use readShort();
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic