org.apache.http.impl.io

## Class SocketInputBuffer

- java.lang.Object
- - org.apache.http.impl.io.AbstractSessionInputBuffer
  - - org.apache.http.impl.io.SocketInputBuffer

- All Implemented Interfaces:
    BufferInfo, EofSensor, SessionInputBuffer

  Deprecated.
  (4.3) use `SessionInputBufferImpl`

      @NotThreadSafe
      @Deprecated
      public class SocketInputBuffer
      extends AbstractSessionInputBuffer
      implements EofSensor

  `SessionInputBuffer` implementation bound to a `Socket`.
  Since:
    4.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SocketInputBuffer(Socket socket, int buffersize, HttpParams params)` Deprecated. Creates an instance of this class.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `fillBuffer()` Deprecated.
    `boolean` | `isDataAvailable(int timeout)` Deprecated. Blocks until some data becomes available in the session buffer or the given timeout period in milliseconds elapses.
    `boolean` | `isEof()` Deprecated.

    - ### Methods inherited from class org.apache.http.impl.io.AbstractSessionInputBuffer

      `available, capacity, createTransportMetrics, getMetrics, hasBufferedData, init, length, read, read, read, readLine, readLine`

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

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

- - ### Constructor Detail

    - #### SocketInputBuffer

          public SocketInputBuffer(Socket socket,
                           int buffersize,
                           HttpParams params)
                            throws IOException

      Deprecated.
      Creates an instance of this class.
      Parameters:
        `socket` - the socket to read data from.
        `buffersize` - the size of the internal buffer. If this number is less than `0` it is set to the value of `Socket.getReceiveBufferSize()`. If resultant number is less than `1024` it is set to `1024`.
        `params` - HTTP parameters.
      Throws:
        `IOException`

  - ### Method Detail

    - #### fillBuffer

          protected int fillBuffer()
                            throws IOException

      Deprecated.
      Overrides:
        `fillBuffer` in class `AbstractSessionInputBuffer`
      Throws:
        `IOException`

    - #### isDataAvailable

          public boolean isDataAvailable(int timeout)
                                  throws IOException

      Deprecated.
      Description copied from interface: `SessionInputBuffer`
      Blocks until some data becomes available in the session buffer or the given timeout period in milliseconds elapses. If the timeout value is `0` this method blocks indefinitely.
      Specified by:
        `isDataAvailable` in interface `SessionInputBuffer`
      Parameters:
        `timeout` - in milliseconds.
      Returns:
        `true` if some data is available in the session buffer or `false` otherwise.
      Throws:
        `IOException` - if an I/O error occurs.

    - #### isEof

          public boolean isEof()

      Deprecated.
      Specified by:
        `isEof` in interface `EofSensor`

Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.