Package com.esotericsoftware.kryo.io

Examples of com.esotericsoftware.kryo.io.Output.clear()


        Output output = outputThreadLocal.get();
        try {
            kryoThreadLocal.get().writeClassAndObject(output, message);
            return ByteBuffer.wrap(output.toBytes());
        } finally {
            output.clear();
        }
    }
}
View Full Code Here


    }

    @Override
    public byte[] write(Object object) {
        final Output out = getOutput();
        out.clear();
        kryo.writeClassAndObject(out, object);
        out.flush();
        return out.toBytes();
    }
View Full Code Here

    }

    @Override
    public void write(OutputStream os, Object object) {
        final Output out = getOutput();
        out.clear();
        out.setOutputStream(os);
        kryo.writeClassAndObject(out, object);
        out.flush();
        out.setOutputStream(null);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.