Basic HTML version of Foils prepared July 6 99

Foil 52 Streams

From Use of Java Language in Computational Science DoD Modernization Users Group Conference Monterey -- June 7 99. by Nancy McCracken, Geoffrey C. Fox


1 A stream is a sequence of bytes or characters.
2 All types of streams are treated similarly, but may have different stream sources and sinks:
  • files
  • network connections
  • blocks of memory
  • threads
3 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();
4 All of the above methods throw a possible IOException.
5 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 Tue Jul 6 1999