com.dtolabs.rundeck.core.execution.utils
Class LeadPipeOutputStream
java.lang.Object
java.io.OutputStream
java.io.PipedOutputStream
com.dtolabs.rundeck.core.execution.utils.LeadPipeOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class LeadPipeOutputStream
- extends java.io.PipedOutputStream
LeadPipeOutputStream is a PipedOutputStream that allows the thread reading from the PipedInputStream to die or finish
without completing, and does not throw any IOExceptions if this occurs. It can be used when the reader thread does
not need to read all of the data, which otherwise would cause an IOException if a writer attempts to write to the
PipedOutputStream and the reading thread is not alive. Once the reader thread finishes or dies, then further writes
to this LeadPipeOutputStream will return without doing anything.
Method Summary |
void |
write(byte[] bytes)
|
void |
write(byte[] bytes,
int i,
int i1)
|
void |
write(int i)
|
Methods inherited from class java.io.PipedOutputStream |
close, connect, flush |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LeadPipeOutputStream
public LeadPipeOutputStream()
write
public void write(int i)
throws java.io.IOException
- Overrides:
write
in class java.io.PipedOutputStream
- Throws:
java.io.IOException
write
public void write(byte[] bytes,
int i,
int i1)
throws java.io.IOException
- Overrides:
write
in class java.io.PipedOutputStream
- Throws:
java.io.IOException
write
public void write(byte[] bytes)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException