Streamable (Apache Tomcat 7.0.96 API Documentation)

org.apache.catalina.tribes.tipis

## Interface Streamable

- Deprecated.
  Unused - will be removed in Tomcat 8.0.x

      @Deprecated
      public interface Streamable

  Example usage: `

       byte[] data = new byte[1024];
       Streamable st = ....;
       while ( !st.eof() ) {
         int length = st.read(data,0,data.length);
         String s = new String(data,0,length);
         System.out.println(s);
       }

  `
  Version:
    1.0
  Author:
    Filip Hanik

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `eof()` Deprecated. returns true if the stream has reached its end
    `int` | `read(byte[] data, int offset, int length)` Deprecated. read data into the byte array starting at offset
    `int` | `write(byte[] data, int offset, int length)` Deprecated. write data into the byte array starting at offset, maximum bytes read are (data.length-offset)

- - ### Method Detail

    - #### eof

          boolean eof()

      Deprecated.
      returns true if the stream has reached its end
      Returns:
        boolean

    - #### write

          int write(byte[] data,
                  int offset,
                  int length)
                    throws java.io.IOException

      Deprecated.
      write data into the byte array starting at offset, maximum bytes read are (data.length-offset)
      Parameters:
        `data` - byte[] - the array to read data into
        `offset` - int - start position for writing data
      Returns:
        int - the number of bytes written into the data buffer
      Throws:
        `java.io.IOException`

    - #### read

          int read(byte[] data,
                 int offset,
                 int length)
                   throws java.io.IOException

      Deprecated.
      read data into the byte array starting at offset
      Parameters:
        `data` - byte[] - the array to read data into
        `offset` - int - start position for writing data
        `length` - - the desired read length
      Returns:
        int - the number of bytes read from the data buffer
      Throws:
        `java.io.IOException`

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