|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
@Beta public interface ByteArrayDataOutput
An extension of DataOutput for writing to in-memory byte arrays; its
methods offer identical functionality but do not throw IOException.
| Method Summary | |
|---|---|
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(java.lang.String s)
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(java.lang.String s)
|
void |
writeDouble(double v)
|
void |
writeFloat(float v)
|
void |
writeInt(int v)
|
void |
writeLong(long v)
|
void |
writeShort(int v)
|
void |
writeUTF(java.lang.String s)
|
| Method Detail |
|---|
void write(int b)
write in interface java.io.DataOutputvoid write(byte[] b)
write in interface java.io.DataOutput
void write(byte[] b,
int off,
int len)
write in interface java.io.DataOutputvoid writeBoolean(boolean v)
writeBoolean in interface java.io.DataOutputvoid writeByte(int v)
writeByte in interface java.io.DataOutputvoid writeShort(int v)
writeShort in interface java.io.DataOutputvoid writeChar(int v)
writeChar in interface java.io.DataOutputvoid writeInt(int v)
writeInt in interface java.io.DataOutputvoid writeLong(long v)
writeLong in interface java.io.DataOutputvoid writeFloat(float v)
writeFloat in interface java.io.DataOutputvoid writeDouble(double v)
writeDouble in interface java.io.DataOutputvoid writeChars(java.lang.String s)
writeChars in interface java.io.DataOutputvoid writeUTF(java.lang.String s)
writeUTF in interface java.io.DataOutput@Deprecated void writeBytes(java.lang.String s)
write(s.getBytes(Charsets.UTF_8)).
writeBytes in interface java.io.DataOutputbyte[] toByteArray()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||