Class FixedBytes
java.lang.Object
org.apache.beam.sdk.schemas.logicaltypes.PassThroughLogicalType<byte[]>
org.apache.beam.sdk.schemas.logicaltypes.FixedBytes
- All Implemented Interfaces:
Serializable,Schema.LogicalType<byte[],byte[]>
A LogicalType representing a fixed-length byte array.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintgetName()static FixedBytesof(int byteArrayLength) Return an instance of FixedBytes with specified byte array length.static FixedBytesReturn an instance of FixedBytes with specified byte array length.byte[]toBaseType(byte[] input) Convert the input type to the type Java type used by the baseSchema.FieldType.byte[]toInputType(byte[] base) Convert the Java type used by the baseSchema.FieldTypeto the input type.toString()Methods inherited from class org.apache.beam.sdk.schemas.logicaltypes.PassThroughLogicalType
getArgument, getArgumentType, getBaseType, getIdentifier
-
Field Details
-
IDENTIFIER
-
-
Method Details
-
of
Return an instance of FixedBytes with specified byte array length.The name, if set, refers to the TYPE name in the underlying database, for example, BINARY.
-
of
Return an instance of FixedBytes with specified byte array length. -
getLength
public int getLength() -
getName
-
toBaseType
public byte[] toBaseType(byte[] input) Description copied from interface:Schema.LogicalTypeConvert the input type to the type Java type used by the baseSchema.FieldType.- Specified by:
toBaseTypein interfaceSchema.LogicalType<byte[],byte[]> - Overrides:
toBaseTypein classPassThroughLogicalType<byte[]>
-
toInputType
public byte[] toInputType(byte[] base) Description copied from interface:Schema.LogicalTypeConvert the Java type used by the baseSchema.FieldTypeto the input type.- Specified by:
toInputTypein interfaceSchema.LogicalType<byte[],byte[]> - Overrides:
toInputTypein classPassThroughLogicalType<byte[]>
-
toString
-