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

com.distkv.core.map.ByteSegment Maven / Gradle / Ivy

The newest version!
package com.distkv.core.map;

import com.distkv.common.utils.ByteUtil;

public class ByteSegment extends FixedValueSegment {

  public ByteSegment(int initSize) {
    super(initSize, ByteUtil.SIZE_OF_BYTE);
  }

  public byte getValue(int key) {
    return getFixedValue(key)[0];
  }

  public byte[] getValues(int key, int cnt) {
    return getFixedValues(key, cnt);
  }

  public void putValue(int key, byte b) {
    putFixedValue(key, new byte[] {b});
  }

  public void putValues(int key, byte[] bytes) {
    putFixedValue(key, bytes);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy