public class LeadPipeInputStream extends PipedInputStream
PipedInputStream that will not die
when the writing Thread is no longer alive.buffer, in, out, PIPE_SIZE| Constructor and Description |
|---|
LeadPipeInputStream()
Construct a new
LeadPipeInputStream. |
LeadPipeInputStream(int size)
Construct a new
LeadPipeInputStream
with the specified buffer size. |
LeadPipeInputStream(PipedOutputStream src)
Construct a new
LeadPipeInputStream to pull
from the specified PipedOutputStream. |
LeadPipeInputStream(PipedOutputStream src,
int size)
Construct a new
LeadPipeInputStream to pull
from the specified PipedOutputStream, using a
circular buffer of the specified size. |
| Modifier and Type | Method and Description |
|---|---|
void |
log(String message,
int loglevel)
Log a message with the specified logging level.
|
int |
read()
Read a byte from the stream.
|
void |
setBufferSize(int size)
Set the size of the buffer.
|
void |
setManagingComponent(ProjectComponent pc)
Set a managing
ProjectComponent for
this LeadPipeInputStream. |
void |
setManagingTask(Task task)
Set a managing
Task for
this LeadPipeInputStream. |
mark, markSupported, read, reset, skippublic LeadPipeInputStream()
LeadPipeInputStream.public LeadPipeInputStream(int size)
LeadPipeInputStream
with the specified buffer size.size - the size of the circular buffer.public LeadPipeInputStream(PipedOutputStream src) throws IOException
LeadPipeInputStream to pull
from the specified PipedOutputStream.src - the PipedOutputStream source.IOException - if unable to construct the stream.public LeadPipeInputStream(PipedOutputStream src, int size) throws IOException
LeadPipeInputStream to pull
from the specified PipedOutputStream, using a
circular buffer of the specified size.src - the PipedOutputStream source.size - the size of the circular buffer.IOException - if there is an error.public void log(String message, int loglevel)
message - the String message.loglevel - the int logging level.public int read()
throws IOException
read in class PipedInputStreamIOException - if there is an error.public void setBufferSize(int size)
size - the new buffer size. Ignored if <= current size.public void setManagingComponent(ProjectComponent pc)
ProjectComponent for
this LeadPipeInputStream.pc - the managing ProjectComponent.public void setManagingTask(Task task)
Task for
this LeadPipeInputStream.task - the managing Task.