|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaudiotagger.audio.asf.data.ContentDescriptor
public final class ContentDescriptor
This class is a wrapper for properties within a
entagged.audioformats.asf.data.ExtendedContentDescription
.
Field Summary | |
---|---|
static java.util.HashSet |
COMMON_FIELD_IDS
This field stores all values of the "ID_"-constants. |
static java.lang.String |
ID_ALBUM
This constant gives the common id (name) for the "album" field in an asf extended content description. |
static java.lang.String |
ID_ARTIST
This constant gives the common id (name) for the "artist" field in an asf extended content description. |
static java.lang.String |
ID_GENRE
This constant gives the common id (name) for the "genre" field in an asf extended content description. |
static java.lang.String |
ID_GENREID
This constant gives the common id (name) for the "genre Id" field in an asf extended content description. |
static java.lang.String |
ID_TRACKNUMBER
This constant gives the common id (name) for the "track number" field in an asf extended content description. |
static java.lang.String |
ID_YEAR
This constant gives the common id (name) for the "year" field in an asf extended content description. |
static int |
TYPE_BINARY
Constant for the content descriptor-type for binary data. |
static int |
TYPE_BOOLEAN
Constant for the content descriptor-type for booleans. |
static int |
TYPE_DWORD
Constant for the content descriptor-type for integers (32-bit). |
static int |
TYPE_QWORD
Constant for the content descriptor-type for integers (64-bit). |
static int |
TYPE_STRING
Constant for the content descriptor-type for Strings. |
static int |
TYPE_WORD
Constant for the content descriptor-type for integers (16-bit). |
Constructor Summary | |
---|---|
ContentDescriptor(java.lang.String propName,
int propType)
Creates an Instance. |
Method Summary | |
---|---|
java.lang.Object |
clone()
(overridden) |
int |
compareTo(java.lang.Object o)
(overridden) |
ContentDescriptor |
createCopy()
This mehtod creates a copy of the current object. |
boolean |
equals(java.lang.Object obj)
(overridden) |
boolean |
getBoolean()
Returns the value of the ContentDescriptor as a Boolean. |
byte[] |
getBytes()
This method will return a byte array, which can directly be written into an "Extended Content Description"-chunk. |
java.lang.String |
getName()
This method returns the name of the content descriptor. |
long |
getNumber()
This method returns the value of the content descriptor as an integer. |
byte[] |
getRawData()
This method returns a copy of the content of the descriptor. |
java.lang.String |
getString()
Returns the value of the ContentDescriptor as a String. |
int |
getType()
Returns the type of the content descriptor. |
boolean |
isCommon()
This method checks whether the name of the current field is one of the commonly specified fields. |
boolean |
isEmpty()
This method checks if the binary data is empty. |
void |
setBinaryValue(byte[] data)
Sets the Value of the current content descriptor. |
void |
setBooleanValue(boolean value)
Sets the Value of the current content descriptor. |
void |
setDWordValue(long value)
Sets the Value of the current content descriptor. |
void |
setQWordValue(long value)
Sets the Value of the current content descriptor. |
void |
setStringValue(java.lang.String value)
Sets the Value of the current content descriptor. |
void |
setWordValue(int value)
Sets the Value of the current content descriptor. |
java.lang.String |
toString()
(overridden) |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.HashSet COMMON_FIELD_IDS
public static final java.lang.String ID_ALBUM
public static final java.lang.String ID_ARTIST
public static final java.lang.String ID_GENRE
public static final java.lang.String ID_GENREID
public static final java.lang.String ID_TRACKNUMBER
public static final java.lang.String ID_YEAR
public static final int TYPE_BINARY
public static final int TYPE_BOOLEAN
public static final int TYPE_DWORD
public static final int TYPE_QWORD
public static final int TYPE_STRING
public static final int TYPE_WORD
Constructor Detail |
---|
public ContentDescriptor(java.lang.String propName, int propType)
propName
- Name of the ContentDescriptor.propType
- Type of the content descriptor. See descriptorType
Method Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
Object.clone()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
Comparable.compareTo(java.lang.Object)
public ContentDescriptor createCopy()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public boolean getBoolean()
true
if first byte of content
is not zero.
public byte[] getBytes()
public java.lang.String getName()
public long getNumber()
content
to a number.
getType()
equals on of the following:
public byte[] getRawData()
public java.lang.String getString()
public int getType()
descriptorType
TYPE_BINARY
,
TYPE_BOOLEAN
,
TYPE_DWORD
,
TYPE_QWORD
,
TYPE_STRING
,
TYPE_WORD
public boolean isCommon()
true
if a common field.ID_ALBUM
,
ID_GENRE
,
ID_GENREID
,
ID_TRACKNUMBER
,
ID_YEAR
public boolean isEmpty()
true
if no value is set.public void setBinaryValue(byte[] data) throws java.lang.IllegalArgumentException
descriptorType
to
TYPE_BINARY
.
data
- Value to set.
java.lang.IllegalArgumentException
- If the byte array is greater that 65535 bytes.public void setBooleanValue(boolean value)
descriptorType
to
TYPE_BOOLEAN
.
value
- Value to set.public void setDWordValue(long value)
descriptorType
to
TYPE_DWORD
.
value
- Value to set.public void setQWordValue(long value)
descriptorType
to
TYPE_QWORD
value
- Value to set.public void setStringValue(java.lang.String value) throws java.lang.IllegalArgumentException
descriptorType
to
TYPE_STRING
.
value
- Value to set.
java.lang.IllegalArgumentException
- If byte representation would take more than 65535 Bytes.public void setWordValue(int value)
descriptorType
to
TYPE_WORD
value
- Value to set.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |