Class StringType
- java.lang.Object
-
- org.apache.cassandra.spark.common.schema.StringType
-
- All Implemented Interfaces:
java.io.Serializable,ColumnType<java.lang.String>
public class StringType extends java.lang.Object implements ColumnType<java.lang.String>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StringType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringparseColumn(java.nio.ByteBuffer buffer, int length)Parses a value of this type from buffer.java.nio.ByteBufferserialize(java.lang.String value)Serialize into ByteBuffer and keeps the position at beginning of ByteBuffer
-
-
-
Method Detail
-
parseColumn
public java.lang.String parseColumn(java.nio.ByteBuffer buffer, int length)Description copied from interface:ColumnTypeParses a value of this type from buffer. Value will be parsed from current position of the buffer. After completion of the function, position will be moved by "length" bytes.- Specified by:
parseColumnin interfaceColumnType<java.lang.String>- Parameters:
buffer- Buffer to parse column fromlength- Serialized value size in buffer is as big as length- Returns:
- value as Java type
-
serialize
public java.nio.ByteBuffer serialize(java.lang.String value)
Description copied from interface:ColumnTypeSerialize into ByteBuffer and keeps the position at beginning of ByteBuffer- Specified by:
serializein interfaceColumnType<java.lang.String>- Parameters:
value- the value to serialize- Returns:
- A ByteBuffer containing the serialized value
-
-