Package io.datarouter.bytes
Record Class GzipBlockStream.GzipBlockStreamRow
java.lang.Object
java.lang.Record
io.datarouter.bytes.GzipBlockStream.GzipBlockStreamRow
- Enclosing class:
- GzipBlockStream
public static record GzipBlockStream.GzipBlockStreamRow(List<byte[]> tokens, int length)
extends Record
One or more tokens that make up a "row" of data.
The splitter keeps rows together in the same block.
It's fine to have just one token.
Lets the caller avoid concatenating the tokens, since they'll just be appended to a GzipOutputStream.
-
Constructor Summary
ConstructorsConstructorDescriptionGzipBlockStreamRow(List<byte[]> tokens) GzipBlockStreamRow(List<byte[]> tokens, int length) Creates an instance of aGzipBlockStreamRowrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]byte[]final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intlength()Returns the value of thelengthrecord component.List<byte[]>tokens()Returns the value of thetokensrecord component.final StringtoString()Returns a string representation of this record class.static int
-
Constructor Details
-
GzipBlockStreamRow
-
GzipBlockStreamRow
Creates an instance of aGzipBlockStreamRowrecord class.- Parameters:
tokens- the value for thetokensrecord componentlength- the value for thelengthrecord component
-
-
Method Details
-
concatTokens
public byte[] concatTokens() -
totalLength
-
concatRows
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
tokens
Returns the value of thetokensrecord component.- Returns:
- the value of the
tokensrecord component
-
length
public int length()Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-