public final class GUID extends Object
Modifier and Type | Field and Description |
---|---|
static GUID |
GUID_AUDIO_ERROR_CONCEALEMENT_ABSENT
This constant defines the GUID for stream chunks describing audio
streams, indicating the the audio stream has no error concealment.
|
static GUID |
GUID_AUDIO_ERROR_CONCEALEMENT_INTERLEAVED
This constant defines the GUID for stream chunks describing audio
streams, indicating the the audio stream has interleaved error
concealment.
|
static GUID |
GUID_AUDIOSTREAM
This constant stores the GUID indicating that stream type is audio.
|
static GUID |
GUID_CONTENT_BRANDING
This constant stores the GUID indicating a content branding object.
|
static GUID |
GUID_CONTENT_ENCRYPTION
This is for the Content Encryption Object
2211B3FB-BD23-11D2-B4B7-00A0C955FC6E, needs to be little-endian.
|
static GUID |
GUID_CONTENTDESCRIPTION
This constant represents the guidData for a chunk which contains Title,
author, copyright, description and rating.
|
static GUID |
GUID_ENCODING
This constant stores the GUID for Encoding-Info chunks.
|
static GUID |
GUID_EXTENDED_CONTENT_DESCRIPTION
This constant defines the GUID for a WMA "Extended Content Description"
chunk.
|
static GUID |
GUID_FILE
GUID of ASF file header.
|
static GUID |
GUID_HEADER
This constant defines the GUID of a asf header chunk.
|
static GUID |
GUID_HEADER_EXTENSION
This constant stores a GUID whose functionality is unknown.
|
static GUID |
GUID_LANGUAGE_LIST
This constant stores the GUID indicating the asf language list object.
|
static int |
GUID_LENGTH
This constant stores the length of GUIDs used with ASF streams.
|
static GUID |
GUID_METADATA
This constant stores the GUID indicating the asf metadata object.
|
static GUID |
GUID_METADATA_LIBRARY
This constant stores the GUID indicating the asf metadata library object.
|
static GUID |
GUID_STREAM
This constant stores the GUID indicating a stream object.
|
static GUID |
GUID_STREAM_BITRATE_PROPERTIES
This constant stores a GUID indicating a "stream bitrate properties"
chunk.
|
static GUID |
GUID_UNSPECIFIED
This constant represents a GUID implementation which can be used for
generic implementations, which have to provide a GUID, but do not really
require a specific GUID to work.
|
static GUID |
GUID_VIDEOSTREAM
This constant stores the GUID indicating that stream type is video.
|
static GUID[] |
KNOWN_GUIDS
This field stores all known GUIDs.
|
static GUID |
SCRIPT_COMMAND_OBJECT
This constant stores the GUID for a "script command object".
|
Constructor and Description |
---|
GUID(byte[] value)
Creates an instance and assigns given
value . |
GUID(int[] value)
Creates an instance and assigns given
value . |
GUID(int[] value,
String desc)
Creates an instance like
GUID(int[]) and sets the optional
description. |
GUID(String guidString,
String desc)
Creates an instance like
GUID(int[]) and sets the optional
description. |
Modifier and Type | Method and Description |
---|---|
static boolean |
assertGUID(int[] value)
This method checks if the given
value is matching the GUID
specification of ASF streams. |
boolean |
equals(Object obj)
This method compares two objects.
|
byte[] |
getBytes()
This method returns the GUID as an array of bytes.
|
static GUID |
getConfigured(GUID orig)
This method looks up a GUID instance from
KNOWN_GUIDS which
matches the value of the given GUID. |
String |
getDescription() |
int[] |
getGUID()
This method returns the GUID of this object.
|
static String |
getGuidDescription(GUID guid)
This method searches a GUID in
KNOWN_GUIDS which is equal to the
given guidData and returns its description. |
int |
hashCode() |
boolean |
isValid()
This method checks if the currently stored GUID (
guidData ) is
correctly filled. |
static GUID |
parseGUID(String guid)
This method parses a String as GUID.
The format is like the one in the ASF specification. An Example: C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA |
String |
prettyPrint()
This method gives a hex formatted representation of
getGUID() |
String |
toString() |
public static final GUID GUID_AUDIO_ERROR_CONCEALEMENT_ABSENT
public static final GUID GUID_AUDIO_ERROR_CONCEALEMENT_INTERLEAVED
public static final GUID GUID_AUDIOSTREAM
public static final GUID GUID_CONTENT_BRANDING
public static final GUID GUID_CONTENT_ENCRYPTION
public static final GUID GUID_CONTENTDESCRIPTION
public static final GUID GUID_ENCODING
public static final GUID GUID_EXTENDED_CONTENT_DESCRIPTION
public static final GUID GUID_FILE
public static final GUID GUID_HEADER
public static final GUID GUID_HEADER_EXTENSION
public static final GUID GUID_LANGUAGE_LIST
public static final int GUID_LENGTH
public static final GUID GUID_METADATA
public static final GUID GUID_METADATA_LIBRARY
public static final GUID GUID_STREAM
public static final GUID GUID_STREAM_BITRATE_PROPERTIES
public static final GUID GUID_UNSPECIFIED
public static final GUID GUID_VIDEOSTREAM
public static final GUID[] KNOWN_GUIDS
public static final GUID SCRIPT_COMMAND_OBJECT
public GUID(byte[] value)
value
.value
- GUID, which should be assigned. (will be converted to int[])public GUID(int[] value)
value
.value
- GUID, which should be assigned.public GUID(int[] value, String desc)
GUID(int[])
and sets the optional
description. value
- GUID, which should be assigned.desc
- Description for the GUID.public GUID(String guidString, String desc)
GUID(int[])
and sets the optional
description. (the int[] is obtained by parseGUID(String)
) guidString
- GUID, which should be assigned.desc
- Description for the GUID.public static boolean assertGUID(int[] value)
value
is matching the GUID
specification of ASF streams. value
- possible GUID.true
if value
matches the specification
of a GUID.public static GUID getConfigured(GUID orig)
KNOWN_GUIDS
which
matches the value of the given GUID.orig
- GUID to look up.KNOWN_GUIDS
if available.
null
else.public static String getGuidDescription(GUID guid)
KNOWN_GUIDS
which is equal to the
given guidData
and returns its description. guid
- GUID, which description is needed.null
public static GUID parseGUID(String guid) throws GUIDFormatException
C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA
guid
- the string to parse.GUIDFormatException
- If the GUID has an invalid format.public boolean equals(Object obj)
GUID
,
the stored GUID values are compared. equals
in class Object
Object.equals(java.lang.Object)
public byte[] getBytes()
getGUID()
public String getDescription()
public int[] getGUID()
public boolean isValid()
guidData
) is
correctly filled. true
if it is.public String prettyPrint()
getGUID()
Copyright © 2005–2020 jthink.net. All rights reserved.