Package org.red5.io.amf3
Interface IDataInput
-
public interface IDataInputInterface implemented by classes that provide a way to load custom objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteOrdergetEndian()Return the byteorder used when loading values.booleanreadBoolean()Read boolean value.bytereadByte()Read signed single byte value.voidreadBytes(byte[] bytes)Read list of bytes.voidreadBytes(byte[] bytes, int offset)Read list of bytes to given offset.voidreadBytes(byte[] bytes, int offset, int length)Read given number of bytes to given offset.doublereadDouble()Read double-precision floating point value.floatreadFloat()Read single-precision floating point value.intreadInt()Read signed integer value.StringreadMultiByte(int length, String charSet)Read multibyte string.ObjectreadObject()Read arbitrary object.shortreadShort()Read signed short value.intreadUnsignedByte()Read unsigned single byte value.longreadUnsignedInt()Read unsigned integer value.intreadUnsignedShort()Read unsigned short value.StringreadUTF()Read UTF-8 encoded string.StringreadUTFBytes(int length)Read UTF-8 encoded string with given length.voidsetEndian(ByteOrder endian)Set the byteorder to use when loading values.
-
-
-
Method Detail
-
getEndian
ByteOrder getEndian()
Return the byteorder used when loading values.- Returns:
- the byteorder
-
setEndian
void setEndian(ByteOrder endian)
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
String readMultiByte(int length, String charSet)
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
String readUTFBytes(int length)
Read UTF-8 encoded string with given length.- Parameters:
length- the length of the string- Returns:
- the string
-
-