public final class FileTypes extends Object
Modifier and Type | Class | Description |
---|---|---|
static interface |
FileTypes.Type |
File types.
|
Modifier and Type | Field | Description |
---|---|---|
static int |
AC3 |
File type for the AC-3 and E-AC-3 formats.
|
static int |
AC4 |
File type for the AC-4 format.
|
static int |
ADTS |
File type for the ADTS format.
|
static int |
AMR |
File type for the AMR format.
|
static int |
FLAC |
File type for the FLAC format.
|
static int |
FLV |
File type for the FLV format.
|
static int |
MATROSKA |
File type for the Matroska and WebM formats.
|
static int |
MP3 |
File type for the MP3 format.
|
static int |
MP4 |
File type for the MP4 format.
|
static int |
OGG |
File type for the Ogg format.
|
static int |
PS |
File type for the MPEG-PS format.
|
static int |
TS |
File type for the MPEG-TS format.
|
static int |
UNKNOWN |
Unknown file type.
|
static int |
WAV |
File type for the WAV format.
|
static int |
WEBVTT |
File type for the WebVTT format.
|
Modifier and Type | Method | Description |
---|---|---|
static int |
inferFileTypeFromMimeType(String mimeType) |
Returns the
FileTypes.Type corresponding to the MIME type provided. |
static int |
inferFileTypeFromResponseHeaders(Map<String,List<String>> responseHeaders) |
Returns the
FileTypes.Type corresponding to the response headers provided. |
static int |
inferFileTypeFromUri(Uri uri) |
Returns the
FileTypes.Type corresponding to the Uri provided. |
public static final int UNKNOWN
public static final int AC3
public static final int AC4
public static final int ADTS
public static final int AMR
public static final int FLAC
public static final int FLV
public static final int MATROSKA
public static final int MP3
public static final int MP4
public static final int OGG
public static final int PS
public static final int TS
public static final int WAV
public static final int WEBVTT
@Type public static int inferFileTypeFromResponseHeaders(Map<String,List<String>> responseHeaders)
FileTypes.Type
corresponding to the response headers provided.@Type public static int inferFileTypeFromMimeType(@Nullable String mimeType)
FileTypes.Type
corresponding to the MIME type provided.
Returns UNKNOWN
if the mime type is null
.
@Type public static int inferFileTypeFromUri(Uri uri)
FileTypes.Type
corresponding to the Uri
provided.