org.farng.mp3.object
Class AbstractTextObject
java.lang.Object
org.farng.mp3.object.AbstractMP3Object
org.farng.mp3.object.AbstractTextObject
- All Implemented Interfaces:
- MP3Object
- Direct Known Subclasses:
- ObjectStringFixedLength, ObjectStringNullTerminated, ObjectStringSizeTerminated
public abstract class AbstractTextObject
- extends AbstractMP3Object
Base implementation for text-based text objects, to handle text
encoding.
- Version:
- $Revision: 3 $ $Date: 2008-12-27 08:09:28 +1300 (Sat, 27 Dec 2008) $
- Author:
- Matt Magoffin (spamsqr@msqr.us)
Method Summary |
void |
readByteArray(byte[] data,
int offset)
Read a String from a byte array. |
protected void |
readString(byte[] data,
int offset,
java.lang.String javaEncoding)
Read a String from offset to the length of the data array. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTextObject
public AbstractTextObject()
AbstractTextObject
public AbstractTextObject(AbstractTextObject copy)
readByteArray
public void readByteArray(byte[] data,
int offset)
- Read a String from a byte array.
The byte at offset - 1
will be used as the
encoding flag bit.
- Overrides:
readByteArray
in class AbstractMP3Object
- Parameters:
data
- the input dataoffset
- the input offset
readString
protected void readString(byte[] data,
int offset,
java.lang.String javaEncoding)
- Read a String from offset to the length of the data array.
This method will look for a null character, and return the
substring up to that character if found.
- Parameters:
data
- the input dataoffset
- the starting offsetjavaEncoding
- the text encoding