Class CodecUtils

java.lang.Object
software.amazon.awssdk.utils.internal.CodecUtils

public final class CodecUtils extends Object
Codec internal utilities
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte[]
    toBytesDirect(String singleOctets)
    Returns a byte array representing the given string, truncating each character into a byte directly.
    static String
    toStringDirect(byte[] bytes)
    Returns a string representing the given byte array, treating each byte as a single octet character.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • toBytesDirect

      public static byte[] toBytesDirect(String singleOctets)
      Returns a byte array representing the given string, truncating each character into a byte directly.
      Throws:
      IllegalArgumentException - if the input string contains any multi-octet character
    • toStringDirect

      public static String toStringDirect(byte[] bytes)
      Returns a string representing the given byte array, treating each byte as a single octet character.