All Packages Class Hierarchy This Package Previous Next Index
Class de.vdheide.mp3.ByteBuilder
java.lang.Object
|
+----de.vdheide.mp3.ByteBuilder
- public class ByteBuilder
- extends Object
This does the opposite of Parser, i.e. it takes Strings or byte array,
parses them and adds them to a byte array.
Text encoding is set with one of the constants:
NONE: ISO-8859-1 and no encoding byte
ISO: ISO-8859-1 and encoding byte
UNICODE: Unicode and encoding byte
-
ISO
-
-
NONE
-
-
UNICODE
-
-
ByteBuilder(byte)
- Creates a new instance
-
ByteBuilder(byte, int)
- Creates a new instance with an estimation of the size needed.
-
getBytes()
- Read contents as byte array
-
put(byte)
- Write a single byte to the end of the so far saved contents.
-
put(byte[])
- Write a byte array to the end of the contents saved so far.
-
put(String)
- Write a text according to the selected encoding
NONE
public static final byte NONE
ISO
public static final byte ISO
UNICODE
public static final byte UNICODE
ByteBuilder
public ByteBuilder(byte encoding)
- Creates a new instance
- Parameters:
- encoding - Encoding to use (see above)
ByteBuilder
public ByteBuilder(byte encoding,
int size)
- Creates a new instance with an estimation of the size needed.
It is most efficient when this estimation is the real size, but
it creates no error if it is not.
Text encoding is set with one of the constants:
NONE: ISO-8859-1 and no encoding byte
ISO: ISO-8859-1 and encoding byte
UNICODE: Unicode and encoding byte
- Parameters:
- encoding - Encoding to use (see above)
- size - Size estimate
put
public void put(byte put)
- Write a single byte to the end of the so far saved contents.
- Parameters:
- put - Byte to insert
put
public void put(byte put[])
- Write a byte array to the end of the contents saved so far.
- Parameters:
- put - Byte array to insert
put
public void put(String put)
- Write a text according to the selected encoding
- Parameters:
- put - Text to write
getBytes
public byte[] getBytes()
- Read contents as byte array
All Packages Class Hierarchy This Package Previous Next Index