public class PipeInputStream
extends java.io.InputStream
It is equivalent to java.io.PipedInputStream but it seems to be quite faster.
Constructor and Description |
---|
PipeInputStream(Pipe pipe)
Creates a new PipeInputStream.
|
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
|
void |
close()
Closes this pipe stream.
|
void |
mark(int readlimit)
Marks the current position in this input stream.
|
boolean |
markSupported()
Tests if this input stream supports the mark and reset methods.
|
int |
read()
Reads the next byte of data from the input stream.
|
int |
read(byte[] buff)
Reads some number of bytes from the input stream and stores them into the buffer array b.
|
int |
read(byte[] buff,
int off,
int len)
Reads up to len bytes of data from the input stream into an array of bytes.
|
void |
reset()
Repositions this stream to the position at the time the mark method was last called on this input stream.
|
long |
skip(long n)
Skips over and discards n bytes of data from this input stream.
|
public PipeInputStream(Pipe pipe)
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] buff) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] buff, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.InputStream
public void mark(int readlimit)
mark
in class java.io.InputStream
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException