Package org.apache.tools.ant

# Class DemuxInputStream

java.lang.Object
java.io.InputStream
org.apache.tools.ant.DemuxInputStream

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

public class DemuxInputStream extends InputStream
Passes input requests to the project object for demultiplexing into individual tasks and threads.

Since:
  Ant 1.6

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DemuxInputStream(Project project)`
  Create a DemuxInputStream for the given project

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `read()`
  Read a byte from the project's demultiplexed input.
  `int`
  `read(byte[] buffer, int offset, int length)`
  Read bytes from the project's demultiplexed input.

  ### Methods inherited from class java.io.InputStream

  `available, close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DemuxInputStream

    public DemuxInputStream(Project project)
    Create a DemuxInputStream for the given project
    Parameters:
      `project` - the project instance

- ## Method Details

  - ### read

    public int read() throws IOException
    Read a byte from the project's demultiplexed input.
    Specified by:
      `read` in class `InputStream`
    Returns:
      the next byte
    Throws:
      `IOException` - on error

  - ### read

    public int read(byte[] buffer, int offset, int length) throws IOException
    Read bytes from the project's demultiplexed input.
    Overrides:
      `read` in class `InputStream`
    Parameters:
      `buffer` - an array of bytes to read into
      `offset` - the offset in the array of bytes
      `length` - the number of bytes in the array
    Returns:
      the number of bytes read
    Throws:
      `IOException` - on error