## org.apache.tools.ant.util
Class LeadPipeInputStream

    java.lang.Object
      |
      +--java.io.InputStream
            |
            +--java.io.PipedInputStream
                  |
                  +--org.apache.tools.ant.util.LeadPipeInputStream

public class LeadPipeInputStream
extends java.io.PipedInputStream

Special `PipedInputStream` that will not die when the writing `Thread` is no longer alive.

Since:
  Ant 1.6.2

Field Summary

Fields inherited from class java.io.PipedInputStream
`buffer, in, out, PIPE_SIZE`

Constructor Summary
`LeadPipeInputStream()` Construct a new `LeadPipeInputStream`.
`LeadPipeInputStream(int size)` Construct a new `LeadPipeInputStream` with the specified buffer size.
`LeadPipeInputStream(java.io.PipedOutputStream src)` Construct a new `LeadPipeInputStream` to pull from the specified `PipedOutputStream`.
`LeadPipeInputStream(java.io.PipedOutputStream src, int size)` Construct a new `LeadPipeInputStream` to pull from the specified `PipedOutputStream`, using a circular buffer of the specified size.

Method Summary
`void` `log(java.lang.String message, int loglevel)` Log a message with the specified logging level.
`int` `read()`
`void` `setBufferSize(int size)` Set the size of the buffer.
`void` `setManagingTask(Task task)` Set a managing `Task` for this `LeadPipeInputStream`.

Methods inherited from class java.io.PipedInputStream
`available, close, connect, read, receive`

Methods inherited from class java.io.InputStream
`mark, markSupported, read, reset, skip`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LeadPipeInputStream

    public LeadPipeInputStream()

  Construct a new `LeadPipeInputStream`.

### LeadPipeInputStream

    public LeadPipeInputStream(int size)

  Construct a new `LeadPipeInputStream` with the specified buffer size.

Parameters:
  `size` - the size of the circular buffer.

### LeadPipeInputStream

    public LeadPipeInputStream(java.io.PipedOutputStream src)
                        throws java.io.IOException

  Construct a new `LeadPipeInputStream` to pull from the specified `PipedOutputStream`.

Parameters:
  `src` - the `PipedOutputStream` source.

### LeadPipeInputStream

    public LeadPipeInputStream(java.io.PipedOutputStream src,
                               int size)
                        throws java.io.IOException

  Construct a new `LeadPipeInputStream` to pull from the specified `PipedOutputStream`, using a circular buffer of the specified size.

Parameters:
  `src` - the `PipedOutputStream` source.
  `size` - the size of the circular buffer.

Method Detail

### read

    public int read()
             throws java.io.IOException

  Overrides:
    `read` in class `java.io.PipedInputStream`
    `java.io.IOException`

### setBufferSize

    public void setBufferSize(int size)

  Set the size of the buffer.

  Parameters:
    `size` - the new buffer size. Ignored if <= current size.

### setManagingTask

    public void setManagingTask(Task task)

  Set a managing `Task` for this `LeadPipeInputStream`.

  Parameters:
    `task` - the managing `Task`.

### log

    public void log(java.lang.String message,
                    int loglevel)

  Log a message with the specified logging level.

  Parameters:
    `message` - the `String` message.
    `loglevel` - the `int` logging level.

Copyright © 2000-2004 Apache Software Foundation. All Rights Reserved.