public class KryoObjectOutput extends KryoDataOutput implements java.io.ObjectOutput
ObjectOutput
which writes data to an Output
.
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 time writeObject(Object)
is invoked since we need to allow unknown null objects.
output
Constructor and Description |
---|
KryoObjectOutput(Kryo kryo,
Output output) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
void |
writeObject(java.lang.Object object) |
setOutput, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
public void writeObject(java.lang.Object object) throws java.io.IOException
writeObject
in interface java.io.ObjectOutput
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.ObjectOutput
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.ObjectOutput
close
in interface java.lang.AutoCloseable
close
in class KryoDataOutput
java.io.IOException
Copyright © 2019. All Rights Reserved.