public class DataStream extends Object implements ObjectInput, ObjectOutput
| Modifier and Type | Field and Description |
|---|---|
protected long |
address |
protected byte[] |
array |
protected static byte |
FIRST_APP_UID |
protected long |
limit |
protected long |
offset |
protected static byte |
REF_EMBEDDED |
protected static byte |
REF_NULL |
protected static byte |
REF_RECURSIVE |
protected static byte |
REF_RECURSIVE2 |
| Modifier | Constructor and Description |
|---|---|
|
DataStream(byte[] array) |
protected |
DataStream(byte[] array,
long address,
long length) |
|
DataStream(int capacity) |
|
DataStream(long address,
long length) |
| Modifier and Type | Method and Description |
|---|---|
long |
address() |
protected long |
alloc(int size) |
byte[] |
array() |
int |
available() |
ByteBuffer |
byteBuffer(int len) |
void |
close() |
int |
count() |
void |
flush() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
read(ByteBuffer dst) |
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt() |
String |
readLine() |
long |
readLong() |
Object |
readObject() |
short |
readShort() |
void |
readTo(long address,
int len) |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
String |
readUTF() |
void |
register(Object obj) |
long |
skip(long n) |
int |
skipBytes(int n) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(ByteBuffer src) |
void |
write(int b) |
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(String s) |
void |
writeChar(int v) |
void |
writeChars(String s) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeFrom(long address,
int len) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeObject(Object obj) |
void |
writeShort(int v) |
void |
writeUTF(String s) |
protected static final byte REF_NULL
protected static final byte REF_RECURSIVE
protected static final byte REF_RECURSIVE2
protected static final byte REF_EMBEDDED
protected static final byte FIRST_APP_UID
protected byte[] array
protected long address
protected long limit
protected long offset
public DataStream(int capacity)
public DataStream(byte[] array)
public DataStream(long address,
long length)
protected DataStream(byte[] array,
long address,
long length)
public byte[] array()
public long address()
public int count()
public void write(int b)
throws IOException
write in interface DataOutputwrite in interface ObjectOutputIOExceptionpublic void write(byte[] b)
throws IOException
write in interface DataOutputwrite in interface ObjectOutputIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in interface DataOutputwrite in interface ObjectOutputIOExceptionpublic void writeBoolean(boolean v)
throws IOException
writeBoolean in interface DataOutputIOExceptionpublic void writeByte(int v)
throws IOException
writeByte in interface DataOutputIOExceptionpublic void writeShort(int v)
throws IOException
writeShort in interface DataOutputIOExceptionpublic void writeChar(int v)
throws IOException
writeChar in interface DataOutputIOExceptionpublic void writeInt(int v)
throws IOException
writeInt in interface DataOutputIOExceptionpublic void writeLong(long v)
throws IOException
writeLong in interface DataOutputIOExceptionpublic void writeFloat(float v)
throws IOException
writeFloat in interface DataOutputIOExceptionpublic void writeDouble(double v)
throws IOException
writeDouble in interface DataOutputIOExceptionpublic void writeBytes(String s) throws IOException
writeBytes in interface DataOutputIOExceptionpublic void writeChars(String s) throws IOException
writeChars in interface DataOutputIOExceptionpublic void writeUTF(String s) throws IOException
writeUTF in interface DataOutputIOExceptionpublic void writeObject(Object obj) throws IOException
writeObject in interface ObjectOutputIOExceptionpublic void write(ByteBuffer src) throws IOException
IOExceptionpublic void writeFrom(long address,
int len)
throws IOException
IOExceptionpublic int read()
throws IOException
read in interface ObjectInputIOExceptionpublic int read(byte[] b)
throws IOException
read in interface ObjectInputIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in interface ObjectInputIOExceptionpublic void readFully(byte[] b)
throws IOException
readFully in interface DataInputIOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws IOException
readFully in interface DataInputIOExceptionpublic long skip(long n)
throws IOException
skip in interface ObjectInputIOExceptionpublic int skipBytes(int n)
throws IOException
skipBytes in interface DataInputIOExceptionpublic boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOExceptionpublic byte readByte()
throws IOException
readByte in interface DataInputIOExceptionpublic int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOExceptionpublic short readShort()
throws IOException
readShort in interface DataInputIOExceptionpublic int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOExceptionpublic char readChar()
throws IOException
readChar in interface DataInputIOExceptionpublic int readInt()
throws IOException
readInt in interface DataInputIOExceptionpublic long readLong()
throws IOException
readLong in interface DataInputIOExceptionpublic float readFloat()
throws IOException
readFloat in interface DataInputIOExceptionpublic double readDouble()
throws IOException
readDouble in interface DataInputIOExceptionpublic String readLine() throws IOException
readLine in interface DataInputIOExceptionpublic String readUTF() throws IOException
readUTF in interface DataInputIOExceptionpublic Object readObject() throws IOException, ClassNotFoundException
readObject in interface ObjectInputIOExceptionClassNotFoundExceptionpublic void read(ByteBuffer dst) throws IOException
IOExceptionpublic void readTo(long address,
int len)
throws IOException
IOExceptionpublic ByteBuffer byteBuffer(int len) throws IOException
IOExceptionpublic int available()
available in interface ObjectInputpublic void flush()
throws IOException
flush in interface ObjectOutputIOExceptionpublic void close()
throws IOException
close in interface ObjectInputclose in interface ObjectOutputclose in interface AutoCloseableIOExceptionpublic void register(Object obj)
protected long alloc(int size)
throws IOException
IOExceptionCopyright © 2019. All rights reserved.