Class ByteArrayDataType

java.lang.Object
org.h2.mvstore.type.BasicDataType<byte[]>
org.h2.mvstore.type.ByteArrayDataType
All Implemented Interfaces:
Comparator<byte[]>, DataType<byte[]>

public final class ByteArrayDataType extends BasicDataType<byte[]>
Class ByteArrayDataType.
  • Field Details

  • Constructor Details

    • ByteArrayDataType

      private ByteArrayDataType()
  • Method Details

    • getMemory

      public int getMemory(byte[] data)
      Description copied from interface: DataType
      Calculates the amount of used memory in bytes.
      Specified by:
      getMemory in interface DataType<byte[]>
      Specified by:
      getMemory in class BasicDataType<byte[]>
      Parameters:
      data - the object
      Returns:
      the used memory
    • write

      public void write(WriteBuffer buff, byte[] data)
      Description copied from interface: DataType
      Write an object.
      Specified by:
      write in interface DataType<byte[]>
      Specified by:
      write in class BasicDataType<byte[]>
      Parameters:
      buff - the target buffer
      data - the value
    • read

      public byte[] read(ByteBuffer buff)
      Description copied from interface: DataType
      Read an object.
      Specified by:
      read in interface DataType<byte[]>
      Specified by:
      read in class BasicDataType<byte[]>
      Parameters:
      buff - the source buffer
      Returns:
      the object
    • createStorage

      public byte[][] createStorage(int size)
      Description copied from interface: DataType
      Create storage object of array type to hold values
      Parameters:
      size - number of values to hold
      Returns:
      storage object