Interface ByteArrayDataOutput
- All Superinterfaces:
DataOutput
An extension of
DataOutput for writing to in-memory byte arrays; its methods offer
identical functionality but do not throw IOException.- Since:
- 1.0
- Author:
- Jayaprabhakar Kadarkarai
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the contents that have been written to this instance, as a byte array.voidwrite(byte[] b) voidwrite(byte[] b, int off, int len) voidwrite(int b) voidwriteBoolean(boolean v) voidwriteByte(int v) voidwriteBytes(String s) Deprecated.This method is dangerous as it discards the high byte of every character.voidwriteChar(int v) voidwriteChars(String s) voidwriteDouble(double v) voidwriteFloat(float v) voidwriteInt(int v) voidwriteLong(long v) voidwriteShort(int v) void
-
Method Details
-
write
- Specified by:
writein interfaceDataOutput
-
write
- Specified by:
writein interfaceDataOutput
-
write
- Specified by:
writein interfaceDataOutput
-
writeBoolean
- Specified by:
writeBooleanin interfaceDataOutput
-
writeByte
- Specified by:
writeBytein interfaceDataOutput
-
writeShort
- Specified by:
writeShortin interfaceDataOutput
-
writeChar
- Specified by:
writeCharin interfaceDataOutput
-
writeInt
- Specified by:
writeIntin interfaceDataOutput
-
writeLong
- Specified by:
writeLongin interfaceDataOutput
-
writeFloat
- Specified by:
writeFloatin interfaceDataOutput
-
writeDouble
- Specified by:
writeDoublein interfaceDataOutput
-
writeChars
- Specified by:
writeCharsin interfaceDataOutput
-
writeUTF
- Specified by:
writeUTFin interfaceDataOutput
-
writeBytes
Deprecated.This method is dangerous as it discards the high byte of every character. For UTF-8, usewrite(s.getBytes(StandardCharsets.UTF_8)).- Specified by:
writeBytesin interfaceDataOutput
-
toByteArray
byte[] toByteArray()Returns the contents that have been written to this instance, as a byte array.
-