public class ID3v23FrameBodyUtility extends Utility
Modifier and Type | Field and Description |
---|---|
protected int |
nextNullTerminatorIndex |
protected int |
nullTerminatorIndex |
Constructor and Description |
---|
ID3v23FrameBodyUtility()
default constructor.
|
Modifier and Type | Method and Description |
---|---|
static int |
getNextNullTerminator(byte[] buffer,
int startingFrom,
Encoding encoding)
finds the next null terminating character in the raw data stream according to the specified character encoding.
|
static java.lang.String |
pricesToString(java.util.List<Price> prices)
convert a list of prices to a string, with each price separated by the "/" character.
example: USD0.99/EUR1.00/GBP0.65 |
static byte[] |
stringToBytes(Encoding encoding,
java.lang.String string)
converts a String to a byte array using a specified character set encoding.
|
bytesToInt, bytesToInt, bytesToShort, bytesToShort, bytesToSynchsafeInt, bytesToSynchsafeShort, formateDate, hex, hex, hex, intToBytes, littleEndianBytesToInt, pad, shortToBytes, synchsafeIntToBytes
protected int nullTerminatorIndex
protected int nextNullTerminatorIndex
public static int getNextNullTerminator(byte[] buffer, int startingFrom, Encoding encoding)
buffer
- the raw binary bytes in which to find the next null terminator character.startingFrom
- the index at which to start searching from in the data.encoding
- the character set used to encode the string (and hence determine the null terminating character).
public static byte[] stringToBytes(Encoding encoding, java.lang.String string)
encoding
- the encoding to use when converting the string to a byte array.string
- the string to be converted to a byte array.public static java.lang.String pricesToString(java.util.List<Price> prices)
prices
- list of prices.