« Back
public class VectorSequenceInputStreamDemo { public static void main(String[] args) throws IOException { InputStream input1 = new FileInputStream("/home/codersarts/file2.txt"); InputStream input2 = new FileInputStream("/home/codersarts/file3.txt"); InputStream input3 = new FileInputStream("/home/codersarts/file4.txt"); Vector
streams = new Vector<>(); streams.add(input1); streams.add(input2); streams.add(input3); Enumeration enumeration = streams.elements(); SequenceInputStream sequenceInputStream = new SequenceInputStream(enumeration); int data = sequenceInputStream.read(); while(data != -1){ System.out.print((char)data); data = sequenceInputStream.read(); } sequenceInputStream.close(); } }
This is tutorial for java beginners this is tutorial for java beginners this is tutorial for java beginners
×
Report a Problem:
Description:
Submit