|
||||||||||
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.NumberVariableLength
public class NumberVariableLength
Represents a number which may span a number of bytes when written to file depending what size is to be represented.
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 xx xx (xx ...) , this denotes at least four bytes but may be more. Sometimes may be completely optional (zero bytes)
Field Summary | |
---|---|
private static int |
MAXIMUM_NO_OF_DIGITS
|
private static int |
MINIMUM_NO_OF_DIGITS
|
(package private) int |
minLength
|
Fields inherited from class org.jaudiotagger.tag.datatype.AbstractDataType |
---|
frameBody, identifier, logger, size, TYPE_ELEMENT, value |
Constructor Summary | |
---|---|
NumberVariableLength(NumberVariableLength copy)
|
|
NumberVariableLength(java.lang.String identifier,
AbstractTagFrameBody frameBody,
int minimumSize)
Creates a new ObjectNumberVariableLength datatype, set minimum length to zero if this datatype is optional. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
int |
getMaximumLenth()
Return the maximum number of digits that can be used to express the number |
int |
getMinimumLength()
Return the minimum number of digits that can be used to express the number |
int |
getSize()
This defines the size in bytes of the datatype being held when read/written to file. |
void |
readByteArray(byte[] arr,
int offset)
Read from Byte Array |
void |
setMinimumSize(int minimumSize)
|
java.lang.String |
toString()
|
byte[] |
writeByteArray()
Write to Byte Array |
Methods inherited from class org.jaudiotagger.tag.datatype.AbstractDataType |
---|
createStructure, getBody, getIdentifier, getValue, readByteArray, setBody, setValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final int MINIMUM_NO_OF_DIGITS
private static final int MAXIMUM_NO_OF_DIGITS
int minLength
Constructor Detail |
---|
public NumberVariableLength(java.lang.String identifier, AbstractTagFrameBody frameBody, int minimumSize)
identifier
- frameBody
- minimumSize
- public NumberVariableLength(NumberVariableLength copy)
Method Detail |
---|
public int getMaximumLenth()
public int getMinimumLength()
public void setMinimumSize(int minimumSize)
minimumSize
- public int getSize()
AbstractDataType
getSize
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 |