Class InputStreamBodyGenerator.ISBody

java.lang.Object
com.ning.http.client.generators.InputStreamBodyGenerator.ISBody
All Implemented Interfaces:
Body, Closeable, AutoCloseable
Enclosing class:
InputStreamBodyGenerator

protected class InputStreamBodyGenerator.ISBody extends Object implements Body
  • Field Details

    • chunk

      protected byte[] chunk
  • Constructor Details

    • ISBody

      protected ISBody()
  • Method Details

    • getContentLength

      public long getContentLength()
      Description copied from interface: Body
      Gets the length of the body.
      Specified by:
      getContentLength in interface Body
      Returns:
      The length of the body in bytes, or negative if unknown.
    • read

      public long read(ByteBuffer buffer) throws IOException
      Description copied from interface: Body
      Reads the next chunk of bytes from the body.
      Specified by:
      read in interface Body
      Parameters:
      buffer - The buffer to store the chunk in, must not be null.
      Returns:
      The non-negative number of bytes actually read or -1 if the body has been read completely.
      Throws:
      IOException - If the chunk could not be read.
    • doRead

      protected int doRead() throws IOException
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException