Package java.io
Class SequenceInputStream
Description:
This method closes this stream and releases any system resources associated with the stream. A closed SequenceInputStream cannot perform input operations and cannot be reopened.
If this stream was created from an enumeration, all remaining elements are requested from the enumeration and closed before the close method returns.
Example
File file = new File("testFile");
String fileString = "Hello World testFile\r";
writeToFile(file,fileString);
InputStream in = new FileInputStream(file);
File file2 = new File("testFil2");
String fileString2 = "Hello World testFile-2\r";
writeToFile(file2,fileString2);
InputStream in2 = new FileInputStream(file2);
SequenceInputStream sis = new SequenceInputStream(in, in2);
...
sis.close();
The example above closes the stream.