org.red5.io.amf3
public class DataInput extends Object implements IDataInput
Modifier | Constructor and Description |
---|---|
protected |
DataInput(Input input,
Deserializer deserializer)
Create a new DataInput.
|
Modifier and Type | Method and Description |
---|---|
ByteOrder |
getEndian()
Return the byteorder used when loading values.
|
boolean |
readBoolean()
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 |
readDouble()
Read double-precision floating point value.
|
float |
readFloat()
Read single-precision floating point value.
|
int |
readInt()
Read signed integer value.
|
String |
readMultiByte(int length,
String charSet)
Read multibyte string.
|
Object |
readObject()
Read arbitrary object.
|
short |
readShort()
Read signed short value.
|
int |
readUnsignedByte()
Read unsigned single byte value.
|
long |
readUnsignedInt()
Read unsigned integer value.
|
int |
readUnsignedShort()
Read unsigned short value.
|
String |
readUTF()
Read UTF-8 encoded string.
|
String |
readUTFBytes(int length)
Read UTF-8 encoded string with given length.
|
void |
setEndian(ByteOrder endian)
Set the byteorder to use when loading values.
|
protected DataInput(Input input, Deserializer deserializer)
input
- input to usedeserializer
- the deserializer to usepublic ByteOrder getEndian()
getEndian
in interface IDataInput
public void setEndian(ByteOrder endian)
setEndian
in interface IDataInput
endian
- the byteorder to usepublic boolean readBoolean()
readBoolean
in interface IDataInput
public byte readByte()
readByte
in interface IDataInput
public void readBytes(byte[] bytes)
readBytes
in interface IDataInput
bytes
- destination for read bytespublic void readBytes(byte[] bytes, int offset)
readBytes
in interface IDataInput
bytes
- destination for read bytesoffset
- offset in destination to write topublic void readBytes(byte[] bytes, int offset, int length)
readBytes
in interface IDataInput
bytes
- destination for read bytesoffset
- offset in destination to write tolength
- number of bytes to readpublic double readDouble()
readDouble
in interface IDataInput
public float readFloat()
readFloat
in interface IDataInput
public int readInt()
readInt
in interface IDataInput
public String readMultiByte(int length, String charSet)
readMultiByte
in interface IDataInput
length
- length of string to readcharSet
- character set of string to readpublic Object readObject()
readObject
in interface IDataInput
public short readShort()
readShort
in interface IDataInput
public int readUnsignedByte()
readUnsignedByte
in interface IDataInput
public long readUnsignedInt()
readUnsignedInt
in interface IDataInput
public int readUnsignedShort()
readUnsignedShort
in interface IDataInput
public String readUTF()
readUTF
in interface IDataInput
public String readUTFBytes(int length)
readUTFBytes
in interface IDataInput
length
- the length of the stringCopyright © 2006-2012 The Red5 Project