Example usage for java.io SequenceInputStream read

List of usage examples for java.io SequenceInputStream read

Introduction

In this page you can find the example usage for java.io SequenceInputStream read.

Prototype

public int read(byte b[], int off, int len) throws IOException 

Source Link

Document

Reads up to len bytes of data from this input stream into an array of bytes.

Usage

From source file:Main.java

public static void main(String args[]) throws IOException {
    SequenceInputStream inStream;
    FileInputStream f1 = new FileInputStream("ByteArrayIOApp.java");
    FileInputStream f2 = new FileInputStream("FileIOApp.java");
    inStream = new SequenceInputStream(f1, f2);

    byte[] arrayBytes = new byte[100];
    int c = inStream.read(arrayBytes, 10, 10);

    inStream.close();/*from  w  w  w.j  a v a2 s. co  m*/
    f1.close();
    f2.close();
}