- java.lang.Object
-
- swim.codec.Unicode
-
public final class Unicode extends Object
Unicode code pointInput
/Output
/Writer
factory.The
Unicode.stringInput(...)
family of functions return anInput
that reads the Unicode code points of aString
.The
Unicode.stringOutput(...)
family of functions return anOutput
that writes Unicode code points to an internal buffer, andbind
aString
containing all written code points.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Parser<String>
lineParser()
static <O> Parser<O>
nullParser()
static <O> Parser<O>
outputParser(Output<O> output)
static Parser<String>
parseLine(Input input)
static Parser<String>
parseLine(Input input, StringBuilder output)
static <O> Parser<O>
parseNull(Input input)
static <O> Parser<O>
parseOutput(Input input, Output<O> output)
static Parser<String>
parseString(Input input)
static Parser<String>
parseString(Input input, StringBuilder builder)
static Input
stringInput(String string)
static Output<String>
stringOutput()
Returns a newOutput
that buffers Unicode code points.static Output<String>
stringOutput(int initialCapacity)
static Output<String>
stringOutput(int initialCapacity, OutputSettings settings)
static Output<String>
stringOutput(String string)
Returns a newOutput
that appends Unicode code points to the givenstring
.static Output<String>
stringOutput(StringBuilder builder)
Returns a newOutput
that writes Unicode code points to the given stringbuilder
.static Output<String>
stringOutput(StringBuilder builder, OutputSettings settings)
Returns a newOutput
that writes Unicode code points to the given stringbuilder
, using the given outputsettings
.static Output<String>
stringOutput(String string, OutputSettings settings)
Returns a newOutput
that appends Unicode code points to the givenstring
, using the given outputsettings
.static Output<String>
stringOutput(OutputSettings settings)
Returns a newOutput
that buffers Unicode code points, using the given outputsettings
.static Parser<String>
stringParser()
static Parser<String>
stringParser(StringBuilder builder)
static <I> Writer<I,Object>
stringWriter()
static <I,O>
Writer<I,O>stringWriter(O input)
static <I> Writer<I,Object>
writeString(Output<?> output, Object input)
-
-
-
Method Detail
-
stringOutput
public static Output<String> stringOutput(StringBuilder builder, OutputSettings settings)
Returns a newOutput
that writes Unicode code points to the given stringbuilder
, using the given outputsettings
. The returnedOutput
accepts an unbounded number of code points, remaining permanently in the cont state, andbinds
aString
containing all written code points.
-
stringOutput
public static Output<String> stringOutput(StringBuilder builder)
Returns a newOutput
that writes Unicode code points to the given stringbuilder
. The returnedOutput
accepts an unbounded number of code points, remaining permanently in the cont state, andbinds
aString
containing all written code points.
-
stringOutput
public static Output<String> stringOutput(String string, OutputSettings settings)
Returns a newOutput
that appends Unicode code points to the givenstring
, using the given outputsettings
. The returnedOutput
accepts an unbounded number of code points, remaining permanently in the cont state, andbinds
aString
containing the givenstring
, and all appended code points.
-
stringOutput
public static Output<String> stringOutput(String string)
Returns a newOutput
that appends Unicode code points to the givenstring
. The returnedOutput
accepts an unbounded number of code points, remaining permanently in the cont state, andbinds
aString
containing the givenstring
, and all appended code points.
-
stringOutput
public static Output<String> stringOutput(int initialCapacity, OutputSettings settings)
-
stringOutput
public static Output<String> stringOutput(OutputSettings settings)
Returns a newOutput
that buffers Unicode code points, using the given outputsettings
. The returnedOutput
accepts an unbounded number of code points, remaining permanently in the cont state, andbinds
aString
containing all written code points.
-
stringOutput
public static Output<String> stringOutput()
Returns a newOutput
that buffers Unicode code points. The returnedOutput
accepts an unbounded number of code points, remaining permanently in the cont state, andbinds
aString
containing all written code points.
-
stringParser
public static Parser<String> stringParser(StringBuilder builder)
-
parseString
public static Parser<String> parseString(Input input, StringBuilder builder)
-
nullParser
public static <O> Parser<O> nullParser()
-
stringWriter
public static <I,O> Writer<I,O> stringWriter(O input)
-
parseLine
public static Parser<String> parseLine(Input input, StringBuilder output)
-
-