public class PseudoInputStream
extends java.io.InputStream
Modifier and Type | Field and Description |
---|---|
protected BlockingByteQueue |
q |
Constructor and Description |
---|
PseudoInputStream() |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
clear()
Clear the stream buffer.
|
void |
close() |
int |
read() |
int |
read(byte[] buf) |
int |
read(byte[] buf,
int ofs,
int len) |
void |
write(byte[] buf)
Write a byte buffer to the stream buffer.
|
void |
write(int c)
Write a byte to the stream buffer.
|
protected BlockingByteQueue q
public void clear()
public void write(int c) throws java.io.IOException
java.io.IOException
public void write(byte[] buf) throws java.io.IOException
java.io.IOException
public int read()
read
in class java.io.InputStream
public int read(byte[] buf, int ofs, int len)
read
in class java.io.InputStream
public int read(byte[] buf)
read
in class java.io.InputStream
public int available()
available
in class java.io.InputStream
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream