Class FixedBytes
- java.lang.Object
-
- org.apache.beam.sdk.schemas.logicaltypes.PassThroughLogicalType<byte[]>
-
- org.apache.beam.sdk.schemas.logicaltypes.FixedBytes
-
- All Implemented Interfaces:
java.io.Serializable
,Schema.LogicalType<byte[],byte[]>
public class FixedBytes extends PassThroughLogicalType<byte[]>
A LogicalType representing a fixed-length byte array.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IDENTIFIER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLength()
@Nullable java.lang.String
getName()
static FixedBytes
of(int byteArrayLength)
Return an instance of FixedBytes with specified byte array length.static FixedBytes
of(@Nullable java.lang.String name, int byteArrayLength)
Return 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.FieldType
to the input type.java.lang.String
toString()
-
Methods inherited from class org.apache.beam.sdk.schemas.logicaltypes.PassThroughLogicalType
getArgument, getArgumentType, getBaseType, getIdentifier
-
-
-
-
Method Detail
-
of
public static FixedBytes of(@Nullable java.lang.String name, int byteArrayLength)
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
public static FixedBytes of(int byteArrayLength)
Return an instance of FixedBytes with specified byte array length.
-
getLength
public int getLength()
-
getName
public @Nullable java.lang.String getName()
-
toBaseType
public byte[] toBaseType(byte[] input)
Description copied from interface:Schema.LogicalType
Convert the input type to the type Java type used by the baseSchema.FieldType
.- Specified by:
toBaseType
in interfaceSchema.LogicalType<byte[],byte[]>
- Overrides:
toBaseType
in classPassThroughLogicalType<byte[]>
-
toInputType
public byte[] toInputType(byte[] base)
Description copied from interface:Schema.LogicalType
Convert the Java type used by the baseSchema.FieldType
to the input type.- Specified by:
toInputType
in interfaceSchema.LogicalType<byte[],byte[]>
- Overrides:
toInputType
in classPassThroughLogicalType<byte[]>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-