Package org.red5.io.amf3
Interface IDataInput
public interface IDataInput
Interface implemented by classes that provide a way to load custom objects.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the byteorder used when loading values.boolean
Read boolean value.byte
readByte()
Read signed single byte value.void
readBytes
(byte[] bytes) Read list of bytes.void
readBytes
(byte[] bytes, int offset) Read list of bytes to given offset.void
readBytes
(byte[] bytes, int offset, int length) Read given number of bytes to given offset.double
Read double-precision floating point value.float
Read single-precision floating point value.int
readInt()
Read signed integer value.readMultiByte
(int length, String charSet) Read multibyte string.Read arbitrary object.short
Read signed short value.int
Read unsigned single byte value.long
Read unsigned integer value.int
Read unsigned short value.readUTF()
Read UTF-8 encoded string.readUTFBytes
(int length) Read UTF-8 encoded string with given length.void
Set the byteorder to use when loading values.
-
Method Details
-
getEndian
ByteOrder getEndian()Return the byteorder used when loading values.- Returns:
- the byteorder
-
setEndian
Set the byteorder to use when loading values.- Parameters:
endian
- the byteorder to use
-
readBoolean
boolean readBoolean()Read boolean value.- Returns:
- the value
-
readByte
byte readByte()Read signed single byte value.- Returns:
- the value
-
readBytes
void readBytes(byte[] bytes) Read list of bytes.- Parameters:
bytes
- destination for read bytes
-
readBytes
void readBytes(byte[] bytes, int offset) Read list of bytes to given offset.- Parameters:
bytes
- destination for read bytesoffset
- offset in destination to write to
-
readBytes
void readBytes(byte[] bytes, int offset, int length) Read given number of bytes to given offset.- Parameters:
bytes
- destination for read bytesoffset
- offset in destination to write tolength
- number of bytes to read
-
readDouble
double readDouble()Read double-precision floating point value.- Returns:
- the value
-
readFloat
float readFloat()Read single-precision floating point value.- Returns:
- the value
-
readInt
int readInt()Read signed integer value.- Returns:
- the value
-
readMultiByte
Read multibyte string.- Parameters:
length
- length of string to readcharSet
- character set of string to read- Returns:
- the string
-
readObject
Object readObject()Read arbitrary object.- Returns:
- the object
-
readShort
short readShort()Read signed short value.- Returns:
- the value
-
readUnsignedByte
int readUnsignedByte()Read unsigned single byte value.- Returns:
- the value
-
readUnsignedInt
long readUnsignedInt()Read unsigned integer value.- Returns:
- the value
-
readUnsignedShort
int readUnsignedShort()Read unsigned short value.- Returns:
- the value
-
readUTF
String readUTF()Read UTF-8 encoded string.- Returns:
- the string
-
readUTFBytes
Read UTF-8 encoded string with given length.- Parameters:
length
- the length of the string- Returns:
- the string
-