@Override
    public void writeObject(ByteBuffer buffer, Object object) throws IOException {
        buffer.putLong((Long)object);
    }
The Long serializer.

@author Lars Wesselius
jme3-networking/src/main/java/com/jme3/network/serializing/serializers/LongSerializer.java