public class KryoObjectOutput extends KryoDataOutput implements java.io.ObjectOutput
ObjectOutput class. Note that this is not a Kryo implementation
of ObjectOutputStream which 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 time writeObject(Object) is invoked since we need
to allow unknown null objects.| Modifier and Type | Field and Description |
|---|---|
private Kryo |
kryo |
output| Constructor and Description |
|---|
KryoObjectOutput(Kryo kryo,
Output output) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
writeObject(java.lang.Object obj) |
setOutput, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFprivate final Kryo kryo
public void writeObject(java.lang.Object obj)
throws java.io.IOException
writeObject in interface java.io.ObjectOutputjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.ObjectOutputjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.ObjectOutputclose in interface java.lang.AutoCloseablejava.io.IOException