|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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.IllegalArgumentException
public 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 AbstractDataType
public void setValue(java.lang.Object value)
AbstractDataType
setValue
in class AbstractDataType
public boolean equals(java.lang.Object obj)
equals
in class AbstractDataType
obj
-
public void readByteArray(byte[] arr, int offset) throws InvalidDataTypeException
readByteArray
in class AbstractDataType
arr
- offset
-
java.lang.NullPointerException
java.lang.IndexOutOfBoundsException
InvalidDataTypeException
public java.lang.String toString()
toString
in class java.lang.Object
public byte[] writeByteArray()
writeByteArray
in class AbstractDataType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |