Java PipedOutputStream (PipedInputStream snk) Constructor

Syntax

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

public PipedOutputStream(PipedInputStream snk)     throws IOException

Example

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


/*  www  . j a v  a 2s.co  m*/

import java.io.PipedInputStream;
import java.io.PipedOutputStream;

public class Main  {

  public static void main(String[] args) throws Exception {
    PipedInputStream in = new PipedInputStream(20);
    PipedOutputStream out = new PipedOutputStream(in);

    out.close();
  }
}