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

org.mapdb.serializer.SerializerByte Maven / Gradle / Ivy

Go to download

MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap memory. It is a fast, scalable and easy to use embedded Java database.

There is a newer version: 3.1.0
Show newest version
package org.mapdb.serializer;

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;

/**
 * Created by jan on 2/28/16.
 */
public class SerializerByte extends GroupSerializerObjectArray {
    @Override
    public void serialize(DataOutput2 out, Byte value) throws IOException {
        out.writeByte(value);
    }

    @Override
    public Byte deserialize(DataInput2 in, int available) throws IOException {
        return in.readByte();
    }

    //TODO value array operations

    @Override
    public int fixedSize() {
        return 1;
    }

    @Override
    public boolean isTrusted() {
        return true;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy