All About Class PipedInputStream in Java

A PipedInputStream is the receiving end of the communication pipe.two threads can communicate by having one thread send the data through PipedInputStream  and other thread read data through a PipedInputStream.

The class PipedInputStream is given as:

public class extends{
public PipedInputStream();
//creates a PipedInputStream which is not yet connected to a PipedOutputStream. It needs to be 
//connected to a PipedOutputStream either by the receiver or the sender before being used.
public PipedInputStream(PipedOutputStream src);
//creates a PipedInputStream which is connected to a PipedOutputStream src..It may throw
//IOException if an I/o error occurs.
public void close();
public void connect(PipedOutputStream src);
public int read();
public int read(byte b[],int offSet,int length);
In addition,all methods may throw an IOException if an IO error occurs apart from their regular Exceptions.

All About Class PipedInputStream in Java All About Class PipedInputStream in Java Reviewed by Animesh Chatterjee on October 10, 2018 Rating: 5

No comments:

Powered by Blogger.