This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

NX: Formats of "DataInputStream" classes?  RSS feed

 
Sang-Wook Kim
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again,
I am confused about the following statement:

All numeric values are stored in the header information use the formats of the DataInputStream and DataOutputStream classes.

Does this mean that I have to use DataInputStream and DataOutputStream classes?? How do their formats look like? Isn't it just streams of bytes? I am using RandomAccessFile and have no problem reading & writing database. Could anybody please clarify this?
Kim
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sang-Wook Kim:
Hello again,
Does this mean that I have to use DataInputStream and DataOutputStream classes?? How do their formats look like? Isn't it just streams of bytes? I am using RandomAccessFile and have no problem reading & writing database. Could anybody please clarify this?
Kim

Hi Kim, I think they are just giving us a hint on how the format is. It does'nt necessarily put a constraint on us to use only those. As a matter of fact, I think most people use RandomAccessFile and other NIO classes only. Bottomline...it should not be a problem. You are good at what you are doing.
Good Luck.
 
Sang-Wook Kim
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Satish~
 
Javini Javono
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

All numeric values are stored in the header information use the formats of the DataInputStream and DataOutputStream classes.

This phrase is essentially saying, albeit in a round-about way, that the numeric
values are stored in the header using the formats of the interfaces implemented
by DataInputStream and DataOutputStream; and, RandomAccessFile implements
the same interfaces.
Thanks,
Javini Javono
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!