public interface ByteArrayDataOutput extends DataOutput
DataOutput for writing to in-memory byte arrays; its methods offer identical functionality but do not throw
IOException.
| Modifier and Type | Method and Description |
|---|---|
byte[] |
toByteArray()
Returns the contents that have been written to this instance, as a byte array.
|
void |
write(byte[] b)
|
void |
write(byte[] b, int off, int len)
|
void |
write(int b)
|
void |
writeBoolean(boolean v)
|
void |
writeByte(int v)
|
void |
writeBytes(String
Deprecated.
This method is dangerous as it discards the high byte of every character. For UTF-8, use
write(s.getBytes(Charsets.UTF_8)).
|
void |
writeChar(int v)
|
void |
writeChars(String
|
void |
writeDouble(double v)
|
void |
writeFloat(float v)
|
void |
writeInt(int v)
|
void |
writeLong(long v)
|
void |
writeShort(int v)
|
void |
writeUTF(String
|
void write(int b)
void write(byte[] b)
void write(byte[] b,
int off,
int len)void writeBoolean(boolean v)
void writeByte(int v)
void writeShort(int v)
void writeChar(int v)
void writeInt(int v)
void writeLong(long v)
void writeFloat(float v)
void writeDouble(double v)
void writeChars(Strings)
void writeUTF(Strings)
@Deprecated void writeBytes(Strings)
write(s.getBytes(Charsets.UTF_8)).
byte[] toByteArray()