org.apache.hc.core5.http.impl.io

## Class SocketHolder

- java.lang.Object
- - org.apache.hc.core5.http.impl.io.SocketHolder

-     public class SocketHolder
      extends Object

  Utility class that holds a `Socket` along with copies of its `InputStream` and `OutputStream`.
  Since:
    5.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SocketHolder(Socket socket)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `InputStream` | `getInputStream()`
    `protected InputStream` | `getInputStream(Socket socket)`
    `OutputStream` | `getOutputStream()`
    `protected OutputStream` | `getOutputStream(Socket socket)`
    `Socket` | `getSocket()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### SocketHolder

          public SocketHolder(Socket socket)

  - ### Method Detail

    - #### getSocket

          public final Socket getSocket()

    - #### getInputStream

          public final InputStream getInputStream()
                                           throws IOException

      Throws:
        `IOException`

    - #### getInputStream

          protected InputStream getInputStream(Socket socket)
                                        throws IOException

      Throws:
        `IOException`

    - #### getOutputStream

          protected OutputStream getOutputStream(Socket socket)
                                          throws IOException

      Throws:
        `IOException`

    - #### getOutputStream

          public final OutputStream getOutputStream()
                                             throws IOException

      Throws:
        `IOException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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