Class SbkString

java.lang.Object
io.sbk.data.impl.SbkString
All Implemented Interfaces:
DataType<String>

public final class SbkString extends Object implements DataType<String>
Class for processing byte[] data.
  • Constructor Details

    • SbkString

      public SbkString()
  • Method Details

    • allocate

      public String allocate(int size)
      Create byte array data.
      Specified by:
      allocate in interface DataType<String>
      Parameters:
      size - size (number of bytes) of the data to create.
      Returns:
      T return the data.
    • create

      public String create(int size)
      Create byte array data and fill the random data.
      Specified by:
      create in interface DataType<String>
      Parameters:
      size - size (number of bytes) of the data to create.
      Returns:
      T return the data.
    • length

      public int length(@NotNull @NotNull String data)
      Get the size of the given data in terms of number of bytes for writers.
      Specified by:
      length in interface DataType<String>
      Parameters:
      data - data
      Returns:
      return size of the data.
    • setTime

      public String setTime(@NotNull @NotNull String data, long time)
      Set the time for data.
      Specified by:
      setTime in interface DataType<String>
      Parameters:
      data - data
      time - time to set
      Returns:
      return the data.
    • getTime

      public long getTime(@NotNull @NotNull String data)
      Get the time of data.
      Specified by:
      getTime in interface DataType<String>
      Parameters:
      data - data
      Returns:
      long return the time set by last setTime(String, long)} )}}.
    • getWriteReadMinSize

      public int getWriteReadMinSize()
      Description copied from interface: DataType
      Get minimum Write and Read Data Size.
      Specified by:
      getWriteReadMinSize in interface DataType<String>
      Returns:
      int minimum data size Write and Read.