Package com.mpatric.mp3agic
Class EncodedText
java.lang.Object
com.mpatric.mp3agic.EncodedText
public class EncodedText extends Object
-
Field Summary
Fields Modifier and Type Field Description static StringCHARSET_ISO_8859_1static StringCHARSET_UTF_16static StringCHARSET_UTF_16BEstatic StringCHARSET_UTF_8static byteTEXT_ENCODING_ISO_8859_1static byteTEXT_ENCODING_UTF_16static byteTEXT_ENCODING_UTF_16BEstatic byteTEXT_ENCODING_UTF_8 -
Constructor Summary
Constructors Constructor Description EncodedText(byte[] value)EncodedText(byte textEncoding, byte[] value)EncodedText(byte textEncoding, String string)EncodedText(String string)EncodedText(String string, byte transcodeToTextEncoding) -
Method Summary
Modifier and Type Method Description protected static CharBufferbytesToCharBuffer(byte[] bytes, String characterSet)protected static byte[]charBufferToBytes(CharBuffer charBuffer, String characterSet)booleanequals(Object obj)StringgetCharacterSet()byte[]getTerminator()bytegetTextEncoding()inthashCode()voidsetTextEncoding(byte textEncoding)voidsetTextEncoding(byte textEncoding, boolean transcode)byte[]toBytes()byte[]toBytes(boolean includeBom)byte[]toBytes(boolean includeBom, boolean includeTerminator)StringtoString()
-
Field Details
-
TEXT_ENCODING_ISO_8859_1
public static final byte TEXT_ENCODING_ISO_8859_1- See Also:
- Constant Field Values
-
TEXT_ENCODING_UTF_16
public static final byte TEXT_ENCODING_UTF_16- See Also:
- Constant Field Values
-
TEXT_ENCODING_UTF_16BE
public static final byte TEXT_ENCODING_UTF_16BE- See Also:
- Constant Field Values
-
TEXT_ENCODING_UTF_8
public static final byte TEXT_ENCODING_UTF_8- See Also:
- Constant Field Values
-
CHARSET_ISO_8859_1
- See Also:
- Constant Field Values
-
CHARSET_UTF_16
- See Also:
- Constant Field Values
-
CHARSET_UTF_16BE
- See Also:
- Constant Field Values
-
CHARSET_UTF_8
- See Also:
- Constant Field Values
-
-
Constructor Details
-
EncodedText
public EncodedText(byte textEncoding, byte[] value) -
EncodedText
- Throws:
IllegalArgumentException
-
EncodedText
public EncodedText(String string, byte transcodeToTextEncoding) throws IllegalArgumentException, CharacterCodingException -
EncodedText
-
EncodedText
public EncodedText(byte[] value)
-
-
Method Details
-
getTextEncoding
public byte getTextEncoding() -
setTextEncoding
- Throws:
CharacterCodingException
-
setTextEncoding
- Throws:
CharacterCodingException
-
getTerminator
public byte[] getTerminator() -
toBytes
public byte[] toBytes() -
toBytes
public byte[] toBytes(boolean includeBom) -
toBytes
public byte[] toBytes(boolean includeBom, boolean includeTerminator) -
toString
-
getCharacterSet
-
hashCode
public int hashCode() -
equals
-
bytesToCharBuffer
protected static CharBuffer bytesToCharBuffer(byte[] bytes, String characterSet) throws CharacterCodingException- Throws:
CharacterCodingException
-
charBufferToBytes
protected static byte[] charBufferToBytes(CharBuffer charBuffer, String characterSet) throws CharacterCodingException- Throws:
CharacterCodingException
-