|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<ContainerType> org.jaudiotagger.audio.asf.data.ContainerType
public enum ContainerType
Enumerates capabilities, respectively uses, of metadata descriptors.
The METADATA_LIBRARY_OBJECT
allows the most variations of data, as
well as no size limitation (if it can be stored within a DWORD amount of
bytes).
Enum Constant Summary | |
---|---|
CONTENT_BRANDING
The descriptor is used in the content branding object (chunk) |
|
CONTENT_DESCRIPTION
The descriptor is used in the content description object (chunk), so maximum data length applies, no language index and stream number are allowed, as well as no multiple values. |
|
EXTENDED_CONTENT
The descriptor is used in an extended content description object, so the maximum data size applies, and no language index and stream number other than "0" is allowed. |
|
METADATA_LIBRARY_OBJECT
The descriptor is used in a metadata library object. |
|
METADATA_OBJECT
The descriptor is used in a metadata object. |
Field Summary | |
---|---|
private GUID |
containerGUID
Stores the guid that identifies ASF chunks which store metadata of the current type. |
private boolean |
guidEnabled
true if the descriptor field can store GUID values. |
private boolean |
languageEnabled
true if descriptor field can refer to a language. |
private java.math.BigInteger |
maximumDataLength
The maximum amount of bytes the descriptor data may consume. |
private boolean |
multiValued
true if the container may store multiple values of the same
metadata descriptor specification (equality on name, language, and
stream).WindowsMedia players advanced tag editor for example stores the WM/Picture attribute once in the extended content description, and all others in the metadata library object. |
private long |
perfMaxDataLen
if -1 a size value has to be compared against
maximumDataLength because Long.MAX_VALUE is exceeded.Otherwise this is the BigInteger.longValue() representation. |
private boolean |
streamEnabled
true if descriptor field can refer to specific streams. |
Method Summary | |
---|---|
static boolean |
areInCorrectOrder(ContainerType low,
ContainerType high)
Determines if low has <= index as high, in respect to getOrdered() |
void |
assertConstraints(java.lang.String name,
byte[] data,
int type,
int stream,
int language)
Calls checkConstraints(String, byte[], int, int, int) and
actually throws the exception if there is one. |
java.lang.RuntimeException |
checkConstraints(java.lang.String name,
byte[] data,
int type,
int stream,
int language)
Checks if the values for a content descriptor match the contraints of the container type, and returns a RuntimeException if the requirements aren't met. |
GUID |
getContainerGUID()
|
java.math.BigInteger |
getMaximumDataLength()
|
static ContainerType[] |
getOrdered()
Returns the elements in an order, that indicates more capabilities (ascending). |
boolean |
isGuidEnabled()
|
boolean |
isLanguageEnabled()
|
boolean |
isMultiValued()
|
boolean |
isStreamNumberEnabled()
|
boolean |
isWithinValueRange(long value)
Tests if the given value is less than or equal to getMaximumDataLength() , and greater or equal to zero. |
static ContainerType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static ContainerType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final ContainerType CONTENT_BRANDING
public static final ContainerType CONTENT_DESCRIPTION
public static final ContainerType EXTENDED_CONTENT
public static final ContainerType METADATA_LIBRARY_OBJECT
public static final ContainerType METADATA_OBJECT
Field Detail |
---|
private final GUID containerGUID
private final boolean guidEnabled
true
if the descriptor field can store GUID
values.
private final boolean languageEnabled
true
if descriptor field can refer to a language.
private final java.math.BigInteger maximumDataLength
private final boolean multiValued
true
if the container may store multiple values of the same
metadata descriptor specification (equality on name, language, and
stream).
private final long perfMaxDataLen
-1
a size value has to be compared against
maximumDataLength
because Long.MAX_VALUE
is exceeded.BigInteger.longValue()
representation.
private final boolean streamEnabled
true
if descriptor field can refer to specific streams.
Method Detail |
---|
public static ContainerType[] values()
for (ContainerType c : ContainerType.values()) System.out.println(c);
public static ContainerType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic static boolean areInCorrectOrder(ContainerType low, ContainerType high)
getOrdered()
low
- high
-
true
if in correct order.public static ContainerType[] getOrdered()
public void assertConstraints(java.lang.String name, byte[] data, int type, int stream, int language)
checkConstraints(String, byte[], int, int, int)
and
actually throws the exception if there is one.
name
- name of the descriptordata
- contenttype
- data typestream
- stream numberlanguage
- language indexpublic java.lang.RuntimeException checkConstraints(java.lang.String name, byte[] data, int type, int stream, int language)
RuntimeException
if the requirements aren't met.
name
- name of the descriptordata
- contenttype
- data typestream
- stream numberlanguage
- language index
null
if everything is fine.public GUID getContainerGUID()
public java.math.BigInteger getMaximumDataLength()
public boolean isGuidEnabled()
public boolean isLanguageEnabled()
public boolean isWithinValueRange(long value)
getMaximumDataLength()
, and greater or equal to zero.
value
- The value to test
true
if size restrictions for binary data are met
with this container type.public boolean isMultiValued()
public boolean isStreamNumberEnabled()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |