org.apache.cassandra.serializers

## Class AbstractTextSerializer

- java.lang.Object
- - org.apache.cassandra.serializers.AbstractTextSerializer

- All Implemented Interfaces:
    TypeSerializer<java.lang.String>
  Direct Known Subclasses:
    AsciiSerializer, UTF8Serializer

      public abstract class AbstractTextSerializer
      extends java.lang.Object
      implements TypeSerializer<java.lang.String>

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractTextSerializer(java.nio.charset.Charset charset)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `deserialize(java.nio.ByteBuffer bytes)`
    `java.lang.Class<java.lang.String>` | `getType()`
    `java.nio.ByteBuffer` | `serialize(java.lang.String value)`
    `java.lang.String` | `toCQLLiteral(java.nio.ByteBuffer buffer)` Generates CQL literal for TEXT/VARCHAR/ASCII types.
    `java.lang.String` | `toString(java.lang.String value)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.cassandra.serializers.TypeSerializer

      `validate`

- - ### Constructor Detail

    - #### AbstractTextSerializer

          protected AbstractTextSerializer(java.nio.charset.Charset charset)

  - ### Method Detail

    - #### deserialize

          public java.lang.String deserialize(java.nio.ByteBuffer bytes)

      Specified by:
        `deserialize` in interface `TypeSerializer<java.lang.String>`

    - #### serialize

          public java.nio.ByteBuffer serialize(java.lang.String value)

      Specified by:
        `serialize` in interface `TypeSerializer<java.lang.String>`

    - #### toString

          public java.lang.String toString(java.lang.String value)

      Specified by:
        `toString` in interface `TypeSerializer<java.lang.String>`

    - #### getType

          public java.lang.Class<java.lang.String> getType()

      Specified by:
        `getType` in interface `TypeSerializer<java.lang.String>`

    - #### toCQLLiteral

          public java.lang.String toCQLLiteral(java.nio.ByteBuffer buffer)

      Generates CQL literal for TEXT/VARCHAR/ASCII types. Caveat: it does only generate literals with single quotes and not pg-style literals.
      Specified by:
        `toCQLLiteral` in interface `TypeSerializer<java.lang.String>`

Copyright © 2018 The Apache Software Foundation