public class PseudoOutputStream
extends java.io.OutputStream
| Modifier and Type | Field and Description |
|---|---|
protected BlockingByteQueue |
q |
| Constructor and Description |
|---|
PseudoOutputStream() |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Get the number of bytes available in stream to read.
|
void |
clear()
Clear the stream buffer.
|
void |
close() |
int |
read()
Read a byte from the stream buffer.
|
int |
read(byte[] buf)
Read a byte buffer from the stream buffer.
|
byte[] |
readAvailable()
Reads all available data from the stream buffer.
|
java.lang.String |
readLine()
Reads a line of text from the stream buffer.
|
void |
write(byte[] buf) |
void |
write(byte[] buf,
int ofs,
int len) |
void |
write(int c) |
protected final BlockingByteQueue q
public void clear()
public void write(int c)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] buf)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] buf,
int ofs,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic int read()
public int read(byte[] buf)
public byte[] readAvailable()
public java.lang.String readLine()
public int available()
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStream