Java Code Examples for org.apache.tinkerpop.shaded.kryo.io.Output#writeBytes()

The following examples show how to use org.apache.tinkerpop.shaded.kryo.io.Output#writeBytes() . 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: HugeGryoModule.java    From hugegraph with Apache License 2.0 5 votes vote down vote up
@Override
public void write(Kryo kryo, Output output, Id id) {
    output.writeByte(id.type().ordinal());
    byte[] idBytes = id.asBytes();
    output.write(idBytes.length);
    output.writeBytes(id.asBytes());
}
 
Example 2
Source File: HugeGryoModule.java    From hugegraph with Apache License 2.0 4 votes vote down vote up
@Override
public void write(Kryo kryo, Output output, EdgeId edgeId) {
    byte[] idBytes = edgeId.asBytes();
    output.write(idBytes.length);
    output.writeBytes(edgeId.asBytes());
}
 
Example 3
Source File: GryoWriter.java    From tinkerpop with Apache License 2.0 4 votes vote down vote up
void writeHeader(final Output output) throws IOException {
    output.writeBytes(GryoMapper.HEADER);
}