Class ByteArrayField
java.lang.Object
io.datarouter.model.field.BaseField<byte[]>
io.datarouter.model.field.imp.array.ByteArrayField
- All Implemented Interfaces:
ByteEncodedField<byte[]>,StringEncodedField<byte[]>,Field<byte[]>,Comparable<Field<byte[]>>
public class ByteArrayField extends BaseField<byte[]>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.datarouter.model.field.BaseField
BaseField.FieldColumnNameComparator -
Field Summary
-
Constructor Summary
Constructors Constructor Description ByteArrayField(ByteArrayFieldKey key, byte[] value) -
Method Summary
Modifier and Type Method Description intcompareTo(Field<byte[]> other)byte[]fromBytesButDoNotSet(byte[] bytes, int byteOffset)byte[]fromBytesWithSeparatorButDoNotSet(byte[] bytes, int offset)byte[]getBytes()byte[]getBytesWithSeparator()ByteArrayFieldKeygetKey()StringgetStringEncodedValue()intgetValueHashCode()StringgetValueString()intnumBytesWithSeparator(byte[] bytes, int offset)byte[]parseStringEncodedValueButDoNotSet(String stringValue)Methods inherited from class io.datarouter.model.field.BaseField
fromString, getPrefix, getPrefixedName, getPreparedStatementValue, getValue, setPrefix, setUsingReflection, setValue, toString
-
Constructor Details
-
Method Details
-
getKey
-
getStringEncodedValue
-
parseStringEncodedValueButDoNotSet
-
getBytes
public byte[] getBytes() -
getBytesWithSeparator
public byte[] getBytesWithSeparator()- Specified by:
getBytesWithSeparatorin interfaceByteEncodedField<byte[]>- Overrides:
getBytesWithSeparatorin classBaseField<byte[]>
-
numBytesWithSeparator
public int numBytesWithSeparator(byte[] bytes, int offset) -
fromBytesWithSeparatorButDoNotSet
public byte[] fromBytesWithSeparatorButDoNotSet(byte[] bytes, int offset)- Specified by:
fromBytesWithSeparatorButDoNotSetin interfaceByteEncodedField<byte[]>- Overrides:
fromBytesWithSeparatorButDoNotSetin classBaseField<byte[]>
-
fromBytesButDoNotSet
public byte[] fromBytesButDoNotSet(byte[] bytes, int byteOffset) -
getValueString
- Specified by:
getValueStringin interfaceField<byte[]>- Overrides:
getValueStringin classBaseField<byte[]>- Returns:
- a human-readable string for use in toString() methods. Should not be used for persistence.
-
getValueHashCode
public int getValueHashCode()- Specified by:
getValueHashCodein interfaceField<byte[]>- Overrides:
getValueHashCodein classBaseField<byte[]>
-
compareTo
-