Package org.apache.tools.ant.util
Class LeadPipeInputStream
java.lang.Object
java.io.InputStream
java.io.PipedInputStream
org.apache.tools.ant.util.LeadPipeInputStream
- All Implemented Interfaces:
- Closeable,- AutoCloseable
Special 
PipedInputStream that will not die
 when the writing Thread is no longer alive.- Since:
- Ant 1.6.2
- 
Field SummaryFields inherited from class java.io.PipedInputStreambuffer, in, out, PIPE_SIZE
- 
Constructor SummaryConstructorsConstructorDescriptionConstruct a newLeadPipeInputStream.LeadPipeInputStream(int size) Construct a newLeadPipeInputStreamwith the specified buffer size.Construct a newLeadPipeInputStreamto pull from the specifiedPipedOutputStream.LeadPipeInputStream(PipedOutputStream src, int size) Construct a newLeadPipeInputStreamto pull from the specifiedPipedOutputStream, using a circular buffer of the specified size.
- 
Method SummaryModifier and TypeMethodDescriptionvoidLog a message with the specified logging level.intread()Read a byte from the stream.voidsetBufferSize(int size) Set the size of the buffer.voidSet a managingProjectComponentfor thisLeadPipeInputStream.voidsetManagingTask(Task task) Set a managingTaskfor thisLeadPipeInputStream.Methods inherited from class java.io.InputStreammark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
- 
Constructor Details- 
LeadPipeInputStreampublic LeadPipeInputStream()Construct a newLeadPipeInputStream.
- 
LeadPipeInputStreampublic LeadPipeInputStream(int size) Construct a newLeadPipeInputStreamwith the specified buffer size.- Parameters:
- size- the size of the circular buffer.
 
- 
LeadPipeInputStreamConstruct a newLeadPipeInputStreamto pull from the specifiedPipedOutputStream.- Parameters:
- src- the- PipedOutputStreamsource.
- Throws:
- IOException- if unable to construct the stream.
 
- 
LeadPipeInputStreamConstruct a newLeadPipeInputStreamto pull from the specifiedPipedOutputStream, using a circular buffer of the specified size.- Parameters:
- src- the- PipedOutputStreamsource.
- size- the size of the circular buffer.
- Throws:
- IOException- if there is an error.
 
 
- 
- 
Method Details- 
readRead a byte from the stream.- Overrides:
- readin class- PipedInputStream
- Returns:
- the byte (0 to 255) or -1 if there are no more.
- Throws:
- IOException- if there is an error.
 
- 
setBufferSizepublic void setBufferSize(int size) Set the size of the buffer.- Parameters:
- size- the new buffer size. Ignored if <= current size.
 
- 
setManagingTaskSet a managingTaskfor thisLeadPipeInputStream.- Parameters:
- task- the managing- Task.
 
- 
setManagingComponentSet a managingProjectComponentfor thisLeadPipeInputStream.- Parameters:
- pc- the managing- ProjectComponent.
 
- 
logLog a message with the specified logging level.- Parameters:
- message- the- Stringmessage.
- loglevel- the- intlogging level.
 
 
-