Package com.google.android.exoplayer2.metadata.icy

## Class IcyHeaders

- java.lang.Object
- - com.google.android.exoplayer2.metadata.icy.IcyHeaders

- All Implemented Interfaces:
    `Parcelable`, `Metadata.Entry`

      public final class IcyHeaders
      extends Object
      implements Metadata.Entry

  ICY headers.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface android.os.Parcelable

      `Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `int` | `bitrate` | Bitrate in bits per second (`(icy-br * 1000)`), or `Format.NO_VALUE` if the header was not present.
    `static Parcelable.Creator<IcyHeaders>` | `CREATOR` |
    `String` | `genre` | The genre (`icy-genre`).
    `boolean` | `isPublic` | Whether the radio station is listed (`icy-pub`), or `false` if the header was not present.
    `int` | `metadataInterval` | The interval in bytes between metadata chunks (`icy-metaint`), or `C.LENGTH_UNSET` if the header was not present.
    `String` | `name` | The stream name (`icy-name`).
    `static String` | `REQUEST_HEADER_ENABLE_METADATA_NAME` |
    `static String` | `REQUEST_HEADER_ENABLE_METADATA_VALUE` |
    `String` | `url` | The URL of the radio station (`icy-url`).

    - ### Fields inherited from interface android.os.Parcelable

      `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `IcyHeaders​(int bitrate, String genre, String name, String url, boolean isPublic, int metadataInterval)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `describeContents()` |
    `boolean` | `equals​(Object obj)` |
    `int` | `hashCode()` |
    `static IcyHeaders` | `parse​(Map<String,​List<String>> responseHeaders)` | Parses `IcyHeaders` from response headers.
    `String` | `toString()` |
    `void` | `writeToParcel​(Parcel dest, int flags)` |

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

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

    - ### Methods inherited from interface com.google.android.exoplayer2.metadata.Metadata.Entry

      `getWrappedMetadataBytes, getWrappedMetadataFormat, populateMediaMetadata`

- - ### Field Detail

    - #### REQUEST_HEADER_ENABLE_METADATA_NAME

          public static final String REQUEST_HEADER_ENABLE_METADATA_NAME

      See Also:
        Constant Field Values

    - #### REQUEST_HEADER_ENABLE_METADATA_VALUE

          public static final String REQUEST_HEADER_ENABLE_METADATA_VALUE

      See Also:
        Constant Field Values

    - #### bitrate

          public final int bitrate

      Bitrate in bits per second (`(icy-br * 1000)`), or `Format.NO_VALUE` if the header was not present.

    - #### genre

          @Nullable
          public final String genre

      The genre (`icy-genre`).

    - #### name

          @Nullable
          public final String name

      The stream name (`icy-name`).

    - #### url

          @Nullable
          public final String url

      The URL of the radio station (`icy-url`).

    - #### isPublic

          public final boolean isPublic

      Whether the radio station is listed (`icy-pub`), or `false` if the header was not present.

    - #### metadataInterval

          public final int metadataInterval

      The interval in bytes between metadata chunks (`icy-metaint`), or `C.LENGTH_UNSET` if the header was not present.

    - #### CREATOR

          public static final Parcelable.Creator<IcyHeaders> CREATOR

  - ### Constructor Detail

    - #### IcyHeaders

          public IcyHeaders​(int bitrate,
                            @Nullable
                            String genre,
                            @Nullable
                            String name,
                            @Nullable
                            String url,
                            boolean isPublic,
                            int metadataInterval)

      Parameters:
        `bitrate` - See `bitrate`.
        `genre` - See `genre`.
        `name` - See `See`.
        `url` - See `url`.
        `isPublic` - See `isPublic`.
        `metadataInterval` - See `metadataInterval`.

  - ### Method Detail

    - #### parse

          @Nullable
          public static IcyHeaders parse​(Map<String,​List<String>> responseHeaders)

      Parses `IcyHeaders` from response headers.
      Parameters:
        `responseHeaders` - The response headers.
      Returns:
        The parsed `IcyHeaders`, or `null` if no ICY headers were present.

    - #### equals

          public boolean equals​(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### writeToParcel

          public void writeToParcel​(Parcel dest,
                                    int flags)

      Specified by:
        `writeToParcel` in interface `Parcelable`

    - #### describeContents

          public int describeContents()

      Specified by:
        `describeContents` in interface `Parcelable`