public class DataStream extends Object implements ObjectInput, ObjectOutput
| Modifier and Type | Field and Description |
|---|---|
protected long |
address |
protected byte[] |
array |
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) |
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(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 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)
write in interface DataOutputwrite in interface ObjectOutputpublic void write(byte[] b)
write in interface DataOutputwrite in interface ObjectOutputpublic void write(byte[] b,
int off,
int len)
write in interface DataOutputwrite in interface ObjectOutputpublic void writeBoolean(boolean v)
writeBoolean in interface DataOutputpublic void writeByte(int v)
writeByte in interface DataOutputpublic void writeShort(int v)
writeShort in interface DataOutputpublic void writeChar(int v)
writeChar in interface DataOutputpublic void writeInt(int v)
writeInt in interface DataOutputpublic void writeLong(long v)
writeLong in interface DataOutputpublic void writeFloat(float v)
writeFloat in interface DataOutputpublic void writeDouble(double v)
writeDouble in interface DataOutputpublic void writeBytes(String s)
writeBytes in interface DataOutputpublic void writeChars(String s)
writeChars in interface DataOutputpublic void writeUTF(String s)
writeUTF in interface DataOutputpublic void writeObject(Object obj) throws IOException
writeObject in interface ObjectOutputIOExceptionpublic void writeFrom(long address,
int len)
public int read()
read in interface ObjectInputpublic int read(byte[] b)
read in interface ObjectInputpublic int read(byte[] b,
int off,
int len)
read in interface ObjectInputpublic void readFully(byte[] b,
int off,
int len)
public long skip(long n)
throws IOException
skip in interface ObjectInputIOExceptionpublic boolean readBoolean()
readBoolean in interface DataInputpublic int readUnsignedByte()
readUnsignedByte in interface DataInputpublic int readUnsignedShort()
readUnsignedShort in interface DataInputpublic double readDouble()
readDouble in interface DataInputpublic Object readObject() throws IOException, ClassNotFoundException
readObject in interface ObjectInputIOExceptionClassNotFoundExceptionpublic void readTo(long address,
int len)
public ByteBuffer byteBuffer(int len)
public int available()
available in interface ObjectInputpublic void flush()
flush in interface ObjectOutputpublic void close()
close in interface ObjectInputclose in interface ObjectOutputclose in interface AutoCloseablepublic void register(Object obj)
protected long alloc(int size)
Copyright © 2018. All rights reserved.