@Override
    public void writeObject(ByteBuffer buffer, Object object) throws IOException {
        String string = (String)object;

        writeString(string, buffer);
    }
String serializer.

@author Lars Wesselius, Paul Speed
jme3-networking/src/main/java/com/jme3/network/serializing/serializers/StringSerializer.java