org.jaudiotagger.tag.datatype
Class ByteArraySizeTerminated
java.lang.Object
org.jaudiotagger.tag.datatype.AbstractDataType
org.jaudiotagger.tag.datatype.ByteArraySizeTerminated
public class ByteArraySizeTerminated
- extends AbstractDataType
Represents a stream of bytes, continuing until the end of the buffer. Usually used for binary data or where
we havent yet mapped the data to a better fitting type.
Method Summary |
boolean |
equals(java.lang.Object obj)
|
int |
getSize()
Return the size in byte of this datatype |
void |
readByteArray(byte[] arr,
int offset)
This is the starting point for reading bytes from the file into the ID3 datatype
starting at offset. |
java.lang.String |
toString()
Because this is usually binary data and could be very long we just return
the number of bytes held |
byte[] |
writeByteArray()
Write contents to a byte array |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ByteArraySizeTerminated
public ByteArraySizeTerminated(java.lang.String identifier,
AbstractTagFrameBody frameBody)
ByteArraySizeTerminated
public ByteArraySizeTerminated(ByteArraySizeTerminated object)
getSize
public int getSize()
- Return the size in byte of this datatype
- Specified by:
getSize
in class AbstractDataType
- Returns:
- the size in bytes
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class AbstractDataType
- Returns:
- whether this and obj are deemed equivalent
readByteArray
public void readByteArray(byte[] arr,
int offset)
throws InvalidDataTypeException
- Description copied from class:
AbstractDataType
- This is the starting point for reading bytes from the file into the ID3 datatype
starting at offset.
This class must be overridden
- Specified by:
readByteArray
in class AbstractDataType
- Parameters:
arr
- offset
-
- Throws:
java.lang.NullPointerException
java.lang.IndexOutOfBoundsException
InvalidDataTypeException
toString
public java.lang.String toString()
- Because this is usually binary data and could be very long we just return
the number of bytes held
- Overrides:
toString
in class java.lang.Object
- Returns:
- the number of bytes
writeByteArray
public byte[] writeByteArray()
- Write contents to a byte array
- Specified by:
writeByteArray
in class AbstractDataType
- Returns:
- a byte array that that contians the data that should be perisisted to file