aspose file tools
The moose likes I/O and Streams and the fly likes How to read file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply Bookmark "How to read file" Watch "How to read file" New topic
Author

How to read file

Angela D'souza
Ranch Hand

Joined: Jan 16, 2002
Posts: 469
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

Joined: Dec 03, 2001
Posts: 125
Siva Prasad
Ranch Hand

Joined: Feb 22, 2001
Posts: 104
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
 
 
subject: How to read file
 
Threads others viewed
how to insert carriage return
Help! Can you explain these bitwise operations?
Writing (INSERTING) to a previously created text file
using byte array to copy contents of one file to another
Convert image to raw binary data
MyEclipse, The Clear Choice