net.metanotion.io.data

## Class StringBytes

- java.lang.Object
- - net.metanotion.io.data.StringBytes

- All Implemented Interfaces:
    Serializer<String>

      public class StringBytes
      extends Object
      implements Serializer<String>

  String serializer using US-ASCII encoding.

  Converts between String objects and US-ASCII byte arrays. Only supports 7-bit ASCII characters.

  Note: Use only when data is guaranteed to contain only US-ASCII. For Unicode text, use `UTF8StringBytes` instead.

  If string contains characters outside US-ASCII range, an Error is thrown.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StringBytes()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `construct(byte[] b)`
    `byte[]` | `getBytes(String o)`

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

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

- - ### Constructor Detail

    - #### StringBytes

          public StringBytes()

  - ### Method Detail

    - #### construct

          public String construct(byte[] b)

      Specified by:
        `construct` in interface `Serializer<String>`

    - #### getBytes

          public byte[] getBytes(String o)

      Specified by:
        `getBytes` in interface `Serializer<String>`