Java IO Tutorial - Java PipedInputStream (PipedOutputStream src) Constructor








Syntax

PipedInputStream(PipedOutputStream src) constructor from PipedInputStream has the following syntax.

public PipedInputStream(PipedOutputStream src)     throws IOException

Example

In the following code shows how to use PipedInputStream.PipedInputStream(PipedOutputStream src) constructor.

import java.io.PipedInputStream;
import java.io.PipedOutputStream;
//ww w.  ja va  2  s.  c o m
public class Main {

  public static void main(String[] args) throws Exception {

    PipedOutputStream out = new PipedOutputStream();

    PipedInputStream in = new PipedInputStream(out);
  }
}