Package com.google.android.exoplayer2.upstream

## Class HttpDataSource.HttpDataSourceException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.io.IOException
      - - com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException

- All Implemented Interfaces:
    `Serializable`
  Direct Known Subclasses:
    `CronetDataSource.OpenException`, `HttpDataSource.CleartextNotPermittedException`, `HttpDataSource.InvalidContentTypeException`, `HttpDataSource.InvalidResponseCodeException`
  Enclosing interface:
    HttpDataSource

      public static class HttpDataSource.HttpDataSourceException
      extends IOException

  Thrown when an error is encountered when trying to read from a `HttpDataSource`.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static interface` | `HttpDataSource.HttpDataSourceException.Type` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `DataSpec` | `dataSpec` | The `DataSpec` associated with the current connection.
    `int` | `type` |
    `static int` | `TYPE_CLOSE` |
    `static int` | `TYPE_OPEN` |
    `static int` | `TYPE_READ` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `HttpDataSourceException​(DataSpec dataSpec, int type)` |
    `HttpDataSourceException​(IOException cause, DataSpec dataSpec, int type)` |
    `HttpDataSourceException​(String message, DataSpec dataSpec, int type)` |
    `HttpDataSourceException​(String message, IOException cause, DataSpec dataSpec, int type)` |

  - ### Method Summary

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

- - ### Field Detail

    - #### TYPE_OPEN

          public static final int TYPE_OPEN

      See Also:
        Constant Field Values

    - #### TYPE_READ

          public static final int TYPE_READ

      See Also:
        Constant Field Values

    - #### TYPE_CLOSE

          public static final int TYPE_CLOSE

      See Also:
        Constant Field Values

    - #### type

          @Type
          public final int type

    - #### dataSpec

          public final DataSpec dataSpec

      The `DataSpec` associated with the current connection.

  - ### Constructor Detail

    - #### HttpDataSourceException

          public HttpDataSourceException​(DataSpec dataSpec,
                                         @Type
                                         int type)

    - #### HttpDataSourceException

          public HttpDataSourceException​(String message,
                                         DataSpec dataSpec,
                                         @Type
                                         int type)

    - #### HttpDataSourceException

          public HttpDataSourceException​(IOException cause,
                                         DataSpec dataSpec,
                                         @Type
                                         int type)

    - #### HttpDataSourceException

          public HttpDataSourceException​(String message,
                                         IOException cause,
                                         DataSpec dataSpec,
                                         @Type
                                         int type)