您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)


Content Index

Content Page # 27

Non-stream files access

So far we have considered a file as being a ‘stream’ of something (bytes, characters, objects). This is very useful when a file has to be read or written in its entirety. It is not so useful when the data must be picked out of the file at widely separated locations.

Java provides a class called RandomAccessFile for this. A random access file models a file as an array of bytes, rather than a stream of bytes

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg