Module swim.codec
Package swim.codec

Class Unicode

java.lang.Object
swim.codec.Unicode

public final class Unicode extends Object
Unicode code point Input/Output/Writer factory.

The Unicode.stringInput(...) family of functions return an Input that reads the Unicode code points of a String.

The Unicode.stringOutput(...) family of functions return an Output that writes Unicode code points to an internal buffer, and bind a String containing all written code points.

  • Method Details

    • stringInput

      public static Input stringInput(String string)
    • stringOutput

      public static Output<String> stringOutput(StringBuilder builder, OutputSettings settings)
      Returns a new Output that writes Unicode code points to the given string builder, using the given output settings. The returned Output accepts an unbounded number of code points, remaining permanently in the cont state, and binds a String containing all written code points.
    • stringOutput

      public static Output<String> stringOutput(StringBuilder builder)
      Returns a new Output that writes Unicode code points to the given string builder. The returned Output accepts an unbounded number of code points, remaining permanently in the cont state, and binds a String containing all written code points.
    • stringOutput

      public static Output<String> stringOutput(String string, OutputSettings settings)
      Returns a new Output that appends Unicode code points to the given string, using the given output settings. The returned Output accepts an unbounded number of code points, remaining permanently in the cont state, and binds a String containing the given string, and all appended code points.
    • stringOutput

      public static Output<String> stringOutput(String string)
      Returns a new Output that appends Unicode code points to the given string. The returned Output accepts an unbounded number of code points, remaining permanently in the cont state, and binds a String containing the given string, and all appended code points.
    • stringOutput

      public static Output<String> stringOutput(int initialCapacity, OutputSettings settings)
    • stringOutput

      public static Output<String> stringOutput(int initialCapacity)
    • stringOutput

      public static Output<String> stringOutput(OutputSettings settings)
      Returns a new Output that buffers Unicode code points, using the given output settings. The returned Output accepts an unbounded number of code points, remaining permanently in the cont state, and binds a String containing all written code points.
    • stringOutput

      public static Output<String> stringOutput()
      Returns a new Output that buffers Unicode code points. The returned Output accepts an unbounded number of code points, remaining permanently in the cont state, and binds a String containing all written code points.
    • stringParser

      public static Parser<String> stringParser(StringBuilder builder)
    • stringParser

      public static Parser<String> stringParser()
    • parseString

      public static Parser<String> parseString(Input input, StringBuilder builder)
    • parseString

      public static Parser<String> parseString(Input input)
    • outputParser

      public static <O> Parser<O> outputParser(Output<O> output)
    • parseOutput

      public static <O> Parser<O> parseOutput(Input input, Output<O> output)
    • nullParser

      public static <O> Parser<O> nullParser()
    • parseNull

      public static <O> Parser<O> parseNull(Input input)
    • stringWriter

      public static <I> Writer<I,Object> stringWriter()
    • stringWriter

      public static <I, O> Writer<I,O> stringWriter(O input)
    • writeString

      public static <I> Writer<I,Object> writeString(Output<?> output, Object input)
    • lineParser

      public static Parser<String> lineParser()
    • parseLine

      public static Parser<String> parseLine(Input input, StringBuilder output)
    • parseLine

      public static Parser<String> parseLine(Input input)