• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to read file

 
Angela D'souza
Ranch Hand
Posts: 469
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Let's say I have size of the file(with the contents inside) is 4000 bytes. I want to read the bytes from 0 to 500 only and I want to put that (0-500) into an array of string. How can I do this? If I can get example would be nice.
Thanks
Angela
 
Steve Deadsea
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Siva Prasad
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about this?

But Angela, instead of asking for the code straight away, I think you should toy with those IO Classes we have in java.io.*
They are very interesting to play with.
cheers
Siva Prasad
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!