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
A kryo adapter for theObjectOutputclass. Note that this is not a Kryo implementation ofObjectOutputStreamwhich has special handling for default 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 obj)-
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 obj) 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- Throws:
IOException
-
-