FileTypes
@UnstableApi
class FileTypes
Defines common file type constants and helper methods.
Summary
Nested types |
|---|
@DocumentedFile types. |
Constants |
|
|---|---|
const Int |
AC3 = 0File type for the AC-3 and E-AC-3 formats. |
const Int |
AC4 = 1File type for the AC-4 format. |
const Int |
ADTS = 2File type for the ADTS format. |
const Int |
AMR = 3File type for the AMR format. |
const Int |
AVI = 16File type for the AVI format. |
const Int |
AVIF = 21File type for the AVIF format. |
const Int |
BMP = 19File type for the BMP format. |
const Int |
FLAC = 4File type for the FLAC format. |
const Int |
FLV = 5File type for the FLV format. |
const Int |
HEIF = 20File type for the HEIF format. |
const Int |
JPEG = 14File type for the JPEG format. |
const Int |
MATROSKA = 6File type for the Matroska and WebM formats. |
const Int |
MIDI = 15File type for the MIDI format. |
const Int |
MP3 = 7File type for the MP3 format. |
const Int |
MP4 = 8File type for the MP4 format. |
const Int |
OGG = 9File type for the Ogg format. |
const Int |
PNG = 17File type for the PNG format. |
const Int |
PS = 10File type for the MPEG-PS format. |
const Int |
TS = 11File type for the MPEG-TS format. |
const Int |
UNKNOWN = -1Unknown file type. |
const Int |
WAV = 12File type for the WAV format. |
const Int |
WEBP = 18File type for the WEBP format. |
const Int |
WEBVTT = 13File type for the WebVTT format. |
Public functions |
|
|---|---|
java-static Int |
@FileTypes.TypeReturns the |
java-static Int |
@FileTypes.TypeReturns the |
java-static Int |
Constants
Public functions
inferFileTypeFromMimeType
@FileTypes.Type
java-static fun inferFileTypeFromMimeType(mimeType: String?): Int
Returns the Type corresponding to the MIME type provided.
Returns UNKNOWN if the MIME type is null.
inferFileTypeFromResponseHeaders
@FileTypes.Type
java-static fun inferFileTypeFromResponseHeaders(
responseHeaders: (Mutable)Map<String!, (Mutable)List<String!>!>!
): Int
Returns the Type corresponding to the response headers provided.