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
AnObjectOutput
which writes data to anOutput
.Note this is not an implementation of
ObjectOutputStream
which 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 void
close()
void
flush()
void
writeObject(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:
writeObject
in interfaceObjectOutput
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceObjectOutput
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceObjectOutput
- Overrides:
close
in classKryoDataOutput
- Throws:
IOException
-
-