Class AsciiType

  • All Implemented Interfaces:
    java.util.Comparator<java.nio.ByteBuffer>, AssignmentTestable

    public class AsciiType
    extends AbstractType<java.lang.String>
    • Field Detail

      • instance

        public static final AsciiType instance
    • Method Detail

      • fromString

        public java.nio.ByteBuffer fromString​(java.lang.String source)
        Description copied from class: AbstractType
        get a byte representation of the given string.
        Specified by:
        fromString in class AbstractType<java.lang.String>
      • toJSONString

        public java.lang.String toJSONString​(java.nio.ByteBuffer buffer,
                                             ProtocolVersion protocolVersion)
        Description copied from class: AbstractType
        Converts the specified value into its JSON representation.

        The buffer position will stay the same.

        Overrides:
        toJSONString in class AbstractType<java.lang.String>
        Parameters:
        buffer - the value to convert
        protocolVersion - the protocol version to use for the conversion
        Returns:
        a JSON string representing the specified value