Basic HTML version of Foils prepared 17 Nov 97

Foil 34 SequenceInputStream

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

SequenceInputStream class for Foil 34
1 The constructor of SequenceInputStream takes a pair of InputStreams and concatenates them together:
2 SequenceInputStream in =
  • new SequenceInputStream (
  • new FileInputStream( file1 ),
  • new FileInputStream( file2 ) );
3 Alternatively, SequenceInputStream takes a Java Enumeration type:
4 SequenceInputStream in =
  • new SequenceInputStream (
  • new FileListEnumerator( args ) );
5 where args is an array of command-line arguments and FileListEnumerator is a class that implements the Enumeration interface.

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