Basic HTML version of Foils prepared Sept 21 1998

Foil 37 SequenceInputStream

From Java Tutorial 98- 4: Multi-Treading, Useful Java Classes, I/O and Networking NAVO Tutorial -- Sept 23 1998. by Geoffrey C. Fox, Nancy McCracken

SequenceInputStream class for Foil 37
1 The constructor of SequenceInputStream takes a pair of InputStreams and concatenates them together:
  • SequenceInputStream in =
  • new SequenceInputStream (
  • new FileInputStream( file1 ),
  • new FileInputStream( file2 ) );
2 Alternatively, SequenceInputStream takes a Java Enumeration type:
  • SequenceInputStream in =
  • new SequenceInputStream (
  • new FileListEnumerator( args ) );
  • 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 Sat Nov 28 1998