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;
/*  w  w  w  .  j a  v a2 s  .c o  m*/
public class Main {

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

    PipedOutputStream out = new PipedOutputStream();

    PipedInputStream in = new PipedInputStream(out);
  }
}