Basic HTML version of Foils prepared 17 Nov 97

Foil 28 I/O Streams

From Java Tutorial, July 1, 1996 CEWES Tutorial, CPS606, JSU Class CSC499 -- July 22-25 1997, Fall 97. by Nancy J. McCracken,Geoffrey C. Fox, Tom Scavo

Java I/O stream constructors for Foil 28
1 A stream is a sequence of bytes or characters.
2 Stream sources and sinks include:
  • files
  • network connections
  • blocks of memory
  • threads
3 That is, all types of streams are treated similarly.
4 The most basic byte streams are InputStream and OutputStream. These classes have methods that can read or write a byte from or to a stream:
  • int read();
  • void write( int );
  • skip( long ); available(); flush(); close();
5 All of the above methods throw a possible IOException.
6 The read() and write( int ) methods "block" during transfer.

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Wed Apr 1 1998