Package com.esotericsoftware.kryo.io
Class KryoObjectOutput
- java.lang.Object
-
- com.esotericsoftware.kryo.io.KryoDataOutput
-
- com.esotericsoftware.kryo.io.KryoObjectOutput
-
- All Implemented Interfaces:
DataOutput,ObjectOutput,AutoCloseable
public class KryoObjectOutput extends KryoDataOutput implements ObjectOutput
AnObjectOutputwhich writes data to anOutput.Note this is not an implementation of
ObjectOutputStreamwhich has special handling for Java serialization and serialization extras like writeReplace. By default it will simply delegate to the appropriate Kryo method. Also, using it will currently add one extra byte for each timewriteObject(Object)is invoked since we need to allow unknown null objects.- Author:
- Robert DiFalco
-
-
Field Summary
-
Fields inherited from class com.esotericsoftware.kryo.io.KryoDataOutput
output
-
-
Constructor Summary
Constructors Constructor Description KryoObjectOutput(Kryo kryo, Output output)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()voidwriteObject(Object object)-
Methods inherited from class com.esotericsoftware.kryo.io.KryoDataOutput
setOutput, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.io.DataOutput
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Methods inherited from interface java.io.ObjectOutput
write, write, write
-
-
-
-
Method Detail
-
writeObject
public void writeObject(Object object) throws IOException
- Specified by:
writeObjectin interfaceObjectOutput- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceObjectOutput- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceObjectOutput- Overrides:
closein classKryoDataOutput- Throws:
IOException
-
-