@GwtIncompatible 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 s)
Deprecated.
This method is dangerous as it discards the high byte of every character. For
UTF-8, use
write(s.getBytes(StandardCharsets.UTF_8)). |
void |
writeChar(int v) |
void |
writeChars(String s) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeShort(int v) |
void |
writeUTF(String s) |
void write(int b)
write in interface DataOutputvoid write(byte[] b)
write in interface DataOutputvoid write(byte[] b, int off, int len)
write in interface DataOutputvoid writeBoolean(boolean v)
writeBoolean in interface DataOutputvoid writeByte(int v)
writeByte in interface DataOutputvoid writeShort(int v)
writeShort in interface DataOutputvoid writeChar(int v)
writeChar in interface DataOutputvoid writeInt(int v)
writeInt in interface DataOutputvoid writeLong(long v)
writeLong in interface DataOutputvoid writeFloat(float v)
writeFloat in interface DataOutputvoid writeDouble(double v)
writeDouble in interface DataOutputvoid writeChars(String s)
writeChars in interface DataOutputvoid writeUTF(String s)
writeUTF in interface DataOutput@Deprecated void writeBytes(String s)
write(s.getBytes(StandardCharsets.UTF_8)).writeBytes in interface DataOutputbyte[] toByteArray()
Copyright © 2010–2017. All rights reserved.