public class TextEncodedStringNullTerminated extends AbstractString
frameBody, identifier, logger, size, TYPE_ELEMENT, value
Constructor and Description |
---|
TextEncodedStringNullTerminated(String identifier,
AbstractTagFrameBody frameBody)
Creates a new TextEncodedStringNullTerminated datatype.
|
TextEncodedStringNullTerminated(String identifier,
AbstractTagFrameBody frameBody,
String value)
Creates a new TextEncodedStringNullTerminated datatype, with value
|
TextEncodedStringNullTerminated(TextEncodedStringNullTerminated object) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
protected Charset |
getTextEncodingCharSet()
Get the text encoding being used.
|
void |
readByteArray(byte[] arr,
int offset)
Read a string from buffer upto null character (if exists)
Must take into account the text encoding defined in the Encoding Object
ID3 Text Frames often allow multiple strings separated by the null char
appropriate for the encoding.
|
byte[] |
writeByteArray()
Write String into byte array, adding a null character to the end of the String
|
canBeEncoded, getCorrectDecoder, getSize, setSize, toString
createStructure, getBody, getIdentifier, getValue, readByteArray, setBody, setValue
public TextEncodedStringNullTerminated(String identifier, AbstractTagFrameBody frameBody)
identifier
- identifies the frame typeframeBody
- public TextEncodedStringNullTerminated(String identifier, AbstractTagFrameBody frameBody, String value)
identifier
- frameBody
- value
- public TextEncodedStringNullTerminated(TextEncodedStringNullTerminated object)
public boolean equals(Object obj)
equals
in class AbstractDataType
public void readByteArray(byte[] arr, int offset) throws InvalidDataTypeException
readByteArray
in class AbstractDataType
arr
- this is the buffer for the frameoffset
- this is where to start reading in the buffer for this fieldInvalidDataTypeException
public byte[] writeByteArray()
writeByteArray
in class AbstractDataType
protected Charset getTextEncodingCharSet()
AbstractString
getTextEncodingCharSet
in class AbstractString
Copyright © 2005–2020 jthink.net. All rights reserved.