public class DataOutput extends Object implements IDataOutput
| Modifier | Constructor and Description |
|---|---|
protected |
DataOutput(Output output)
Create a new DataOutput.
|
| Modifier and Type | Method and Description |
|---|---|
ByteOrder |
getEndian()
Return the byteorder used when storing values.
|
void |
setEndian(ByteOrder endian)
Set the byteorder to use when storing values.
|
void |
writeBoolean(boolean value)
Write boolean value.
|
void |
writeByte(byte value)
Write signed byte value.
|
void |
writeBytes(byte[] bytes)
Write multiple bytes.
|
void |
writeBytes(byte[] bytes,
int offset)
Write multiple bytes from given offset.
|
void |
writeBytes(byte[] bytes,
int offset,
int length)
Write given number of bytes from given offset.
|
void |
writeDouble(double value)
Write double-precision floating point value.
|
void |
writeFloat(float value)
Write single-precision floating point value.
|
void |
writeInt(int value)
Write signed integer value.
|
void |
writeMultiByte(String value,
String encoding)
Write string in given character set.
|
void |
writeObject(Object value)
Write arbitrary object.
|
void |
writeShort(short value)
Write signed short value.
|
void |
writeUnsignedInt(long value)
Write unsigned integer value.
|
void |
writeUTF(String value)
Write UTF-8 encoded string.
|
void |
writeUTFBytes(String value)
Write UTF-8 encoded string as byte array.
|
protected DataOutput(Output output)
output - destination to write topublic ByteOrder getEndian()
getEndian in interface IDataOutputpublic void setEndian(ByteOrder endian)
setEndian in interface IDataOutputendian - the byteorder to usepublic void writeBoolean(boolean value)
writeBoolean in interface IDataOutputvalue - the valuepublic void writeByte(byte value)
writeByte in interface IDataOutputvalue - the valuepublic void writeBytes(byte[] bytes)
writeBytes in interface IDataOutputbytes - the bytespublic void writeBytes(byte[] bytes,
int offset)
writeBytes in interface IDataOutputbytes - the bytesoffset - offset in bytes to start writing frompublic void writeBytes(byte[] bytes,
int offset,
int length)
writeBytes in interface IDataOutputbytes - the bytesoffset - offset in bytes to start writing fromlength - number of bytes to writepublic void writeDouble(double value)
writeDouble in interface IDataOutputvalue - the valuepublic void writeFloat(float value)
writeFloat in interface IDataOutputvalue - the valuepublic void writeInt(int value)
writeInt in interface IDataOutputvalue - the valuepublic void writeMultiByte(String value, String encoding)
writeMultiByte in interface IDataOutputvalue - the stringencoding - the character setpublic void writeObject(Object value)
writeObject in interface IDataOutputvalue - the objectpublic void writeShort(short value)
writeShort in interface IDataOutputvalue - the valuepublic void writeUnsignedInt(long value)
writeUnsignedInt in interface IDataOutputvalue - the valuepublic void writeUTF(String value)
writeUTF in interface IDataOutputvalue - the stringpublic void writeUTFBytes(String value)
IDataInput.readUTFBytes(int) must be used to load it.writeUTFBytes in interface IDataOutputvalue - the stringCopyright © 2005–2017 Red5. All rights reserved.