Serializer.registerClass - UUID

I think this must be more efficient:

public class UUIDSerializer extends Serializer {

    @Override
    public <T> T readObject(ByteBuffer data, Class<T> c) throws IOException {
        return (T) new UUID(data.getLong(), data.getLong());
    }

    @Override
    public void writeObject(ByteBuffer buffer, Object object) throws IOException {
        UUID uuid = (UUID) object;
        
        buffer.putLong(uuid.getMostSignificantBits());
        buffer.putLong(uuid.getLeastSignificantBits());
    }

}