|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.vdheide.mp3.ByteBuilder
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:
Field Summary | |
static byte |
ISO
Encoding ISO-8859-1 |
static byte |
NONE
No encoding byte, assume ISO-8859-1 |
static byte |
UNICODE
Encoding Unicode |
Constructor Summary | |
ByteBuilder(byte encoding)
Creates a new instance |
|
ByteBuilder(byte encoding,
int size)
Creates a new instance with an estimation of the size needed. |
Method Summary | |
byte[] |
getBytes()
Read contents as byte array |
void |
put(byte put)
Append a single byte. |
void |
put(byte[] put)
Append the contents of a byte array. |
void |
put(java.lang.String put)
Append a text according to the selected encoding |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final byte NONE
public static final byte ISO
public static final byte UNICODE
Constructor Detail |
public ByteBuilder(byte encoding)
encoding
- Encoding to use (see above)public ByteBuilder(byte encoding, int size)
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
encoding
- Encoding to use (see above)size
- Size estimateMethod Detail |
public void put(byte put)
put
- Byte to insertpublic void put(byte[] put)
put
- Byte array to insertpublic void put(java.lang.String put)
put
- Text to writepublic byte[] getBytes()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |