Package org.red5.io.amf3
Interface IDataOutput
- All Known Implementing Classes:
ByteArray,DataOutput
public interface IDataOutput
Interface implemented by classes that provide a way to store custom objects.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the byteorder used when storing values.voidSet the byteorder to use when storing values.voidwriteBoolean(boolean value) Write boolean value.voidwriteByte(byte value) Write signed byte value.voidwriteBytes(byte[] bytes) Write multiple bytes.voidwriteBytes(byte[] bytes, int offset) Write multiple bytes from given offset.voidwriteBytes(byte[] bytes, int offset, int length) Write given number of bytes from given offset.voidwriteDouble(double value) Write double-precision floating point value.voidwriteFloat(float value) Write single-precision floating point value.voidwriteInt(int value) Write signed integer value.voidwriteMultiByte(String value, String encoding) Write string in given character set.voidwriteObject(Object value) Write arbitrary object.voidwriteShort(short value) Write signed short value.voidwriteUnsignedInt(long value) Write unsigned integer value.voidWrite UTF-8 encoded string.voidwriteUTFBytes(String value) Write UTF-8 encoded string as byte array.
-
Method Details
-
getEndian
ByteOrder getEndian()Return the byteorder used when storing values.- Returns:
- the byteorder
-
setEndian
Set the byteorder to use when storing values.- Parameters:
endian- the byteorder to use
-
writeBoolean
void writeBoolean(boolean value) Write boolean value.- Parameters:
value- the value
-
writeByte
void writeByte(byte value) Write signed byte value.- Parameters:
value- the value
-
writeBytes
void writeBytes(byte[] bytes) Write multiple bytes.- Parameters:
bytes- the bytes
-
writeBytes
void writeBytes(byte[] bytes, int offset) Write multiple bytes from given offset.- Parameters:
bytes- the bytesoffset- offset in bytes to start writing from
-
writeBytes
void writeBytes(byte[] bytes, int offset, int length) Write given number of bytes from given offset.- Parameters:
bytes- the bytesoffset- offset in bytes to start writing fromlength- number of bytes to write
-
writeDouble
void writeDouble(double value) Write double-precision floating point value.- Parameters:
value- the value
-
writeFloat
void writeFloat(float value) Write single-precision floating point value.- Parameters:
value- the value
-
writeInt
void writeInt(int value) Write signed integer value.- Parameters:
value- the value
-
writeMultiByte
Write string in given character set.- Parameters:
value- the stringencoding- the character set
-
writeObject
Write arbitrary object.- Parameters:
value- the object
-
writeShort
void writeShort(short value) Write signed short value.- Parameters:
value- the value
-
writeUnsignedInt
void writeUnsignedInt(long value) Write unsigned integer value.- Parameters:
value- the value
-
writeUTF
Write UTF-8 encoded string.- Parameters:
value- the string
-
writeUTFBytes
Write UTF-8 encoded string as byte array. This string is stored without informations about its length, soIDataInput.readUTFBytes(int)must be used to load it.- Parameters:
value- the string
-