Package one.nio.serial
Class ObjectOutputChannel
- java.lang.Object
-
- one.nio.serial.DataStream
-
- one.nio.serial.ObjectOutputChannel
-
- All Implemented Interfaces:
DataInput,DataOutput,ObjectInput,ObjectOutput,AutoCloseable
public class ObjectOutputChannel extends DataStream
-
-
Field Summary
-
Fields inherited from class one.nio.serial.DataStream
address, array, FIRST_BOOT_UID, limit, offset, REF_EMBEDDED, REF_NULL, REF_RECURSIVE, REF_RECURSIVE2
-
-
Constructor Summary
Constructors Constructor Description ObjectOutputChannel(WritableByteChannel ch)ObjectOutputChannel(WritableByteChannel ch, int bufSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longalloc(int size)voidclose()voidflush()longgetBytesWritten()voidreset()voidwriteObject(Object obj)-
Methods inherited from class one.nio.serial.DataStream
address, array, available, byteBuffer, count, newScope, read, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readObject, readRef, readShort, readTo, readUnsignedByte, readUnsignedShort, readUTF, register, skip, skipBytes, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeFrom, writeInt, writeLong, writeShort, writeUTF
-
-
-
-
Constructor Detail
-
ObjectOutputChannel
public ObjectOutputChannel(WritableByteChannel ch)
-
ObjectOutputChannel
public ObjectOutputChannel(WritableByteChannel ch, int bufSize)
-
-
Method Detail
-
getBytesWritten
public long getBytesWritten()
-
writeObject
public void writeObject(Object obj) throws IOException
- Specified by:
writeObjectin interfaceObjectOutput- Overrides:
writeObjectin classDataStream- Throws:
IOException
-
reset
public void reset()
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceObjectOutput- Overrides:
flushin classDataStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceObjectInput- Specified by:
closein interfaceObjectOutput- Overrides:
closein classDataStream- Throws:
IOException
-
alloc
protected long alloc(int size) throws IOException- Overrides:
allocin classDataStream- Throws:
IOException
-
-