Package io.sbk.data.impl
Class ByteArray
java.lang.Object
io.sbk.data.impl.ByteArray
- All Implemented Interfaces:
DataType<byte[]>
Class for processing byte[] data.
-
Field Summary
Fields inherited from interface io.sbk.data.DataType
TIME_HEADER_BYTES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
allocate
(int size) Create byte array data.byte[]
create
(int size) Create byte array data and fill the random data.long
getTime
(byte[] data) Get the time of data.int
Get minimum Write and Read Data Size.int
length
(@org.jetbrains.annotations.NotNull byte[] data) Get the size of the given data in terms of number of bytes for writers.byte[]
setTime
(byte[] data, long time) Set the time for data.
-
Constructor Details
-
ByteArray
public ByteArray()
-
-
Method Details
-
allocate
public byte[] allocate(int size) Create byte array data. -
create
public byte[] create(int size) Create byte array data and fill the random data. -
length
public int length(@NotNull @org.jetbrains.annotations.NotNull byte[] data) Get the size of the given data in terms of number of bytes for writers. -
setTime
public byte[] setTime(byte[] data, long time) Set the time for data. -
getTime
public long getTime(byte[] data) Get the time of data.- Specified by:
getTime
in interfaceDataType<byte[]>
- Parameters:
data
- data- Returns:
- long return the time set by last
setTime(byte[], long)
} )}}.
-
getWriteReadMinSize
public int getWriteReadMinSize()Get minimum Write and Read Data Size.- Specified by:
getWriteReadMinSize
in interfaceDataType<byte[]>
- Returns:
- int minimum data size Write and Read.
-