com.esotericsoftware.kryo.io.UnsafeOutput Java Examples
The following examples show how to use
com.esotericsoftware.kryo.io.UnsafeOutput.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KryoQuickTypeSerializer.java From vertexium with Apache License 2.0 | 5 votes |
@Override public byte[] objectToBytes(Object value) { Output output = new UnsafeOutput(2000, -1); output.writeByte(MARKER_KRYO); kryo.get().writeClassAndObject(output, value); return output.toBytes(); }
Example #2
Source File: KryoVertexiumSerializer.java From vertexium with Apache License 2.0 | 5 votes |
@Override public byte[] objectToBytes(Object object) { if (object == null) { return EMPTY; } Output output = new UnsafeOutput(2000, -1); kryo.get().writeClassAndObject(output, object); return output.toBytes(); }