|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaudiotagger.tag.datatype.AbstractDataType
org.jaudiotagger.tag.datatype.NumberFixedLength
public class NumberFixedLength
Represents a number held as a fixed number of digits.
The bitorder in ID3v2 is most significant bit first (MSB). The byteorder in multibyte numbers is most significant byte first (e.g. $12345678 would be encoded $12 34 56 78), also known as big endian and network byte order. In ID3Specification would be denoted as $xx xx this denotes exactly two bytes required
| Field Summary |
|---|
| Fields inherited from class org.jaudiotagger.tag.datatype.AbstractDataType |
|---|
frameBody, identifier, logger, size, TYPE_ELEMENT, value |
| Constructor Summary | |
|---|---|
NumberFixedLength(NumberFixedLength copy)
|
|
NumberFixedLength(java.lang.String identifier,
AbstractTagFrameBody frameBody,
int size)
Creates a new ObjectNumberFixedLength datatype. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
int |
getSize()
Return size |
void |
readByteArray(byte[] arr,
int offset)
Read the number from the byte array |
void |
setSize(int size)
Set Size in Bytes of this Object |
void |
setValue(java.lang.Object value)
Set the value held by this datatype, this is used typically used when the user wants to modify the value in an existing frame. |
java.lang.String |
toString()
|
byte[] |
writeByteArray()
Write data to byte array |
| Methods inherited from class org.jaudiotagger.tag.datatype.AbstractDataType |
|---|
createStructure, getBody, getIdentifier, getValue, readByteArray, setBody |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NumberFixedLength(java.lang.String identifier,
AbstractTagFrameBody frameBody,
int size)
identifier - frameBody - size - the number of significant places that the number is held to
java.lang.IllegalArgumentExceptionpublic NumberFixedLength(NumberFixedLength copy)
| Method Detail |
|---|
public void setSize(int size)
size - in bytes that this number will be held aspublic int getSize()
getSize in class AbstractDataTypepublic void setValue(java.lang.Object value)
AbstractDataType
setValue in class AbstractDataTypepublic boolean equals(java.lang.Object obj)
equals in class AbstractDataTypeobj -
public void readByteArray(byte[] arr,
int offset)
throws InvalidDataTypeException
readByteArray in class AbstractDataTypearr - offset -
java.lang.NullPointerException
java.lang.IndexOutOfBoundsException
InvalidDataTypeExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic byte[] writeByteArray()
writeByteArray in class AbstractDataType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||