All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.securegraph.accumulo.serializer.JavaValueSerializer Maven / Gradle / Ivy

The newest version!
package org.securegraph.accumulo.serializer;

import org.apache.accumulo.core.data.Value;
import org.securegraph.util.JavaSerializableUtils;

import java.util.Map;

public class JavaValueSerializer implements ValueSerializer {
    @Override
    public Value objectToValue(Object value) {
        return new Value(JavaSerializableUtils.objectToBytes(value));
    }

    @Override
    public  T valueToObject(Value value) {
        return valueToObject(value.get());
    }

    @Override
    public  T valueToObject(byte[] data) {
        return (T) JavaSerializableUtils.bytesToObject(data);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy