java.lang.Object
io.jstach.jstachio.Output.StringOutput
- All Implemented Interfaces:
Output<RuntimeException>
String Builder based output.
- Author:
- agentgt
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jstach.jstachio.Output
Output.CloseableEncodedOutput<E extends Exception>, Output.EncodedOutput<E extends Exception>, Output.StringOutput
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
append
(boolean b) Write a long by usingString.valueOf(long)
.void
append
(char c) Appends a character to an appendable.void
append
(double d) Write a long by usingString.valueOf(long)
.void
append
(int i) Write a int by usingString.valueOf(int)
.void
append
(long l) Write a long by usingString.valueOf(long)
.void
append
(short s) Write a short by usingString.valueOf(int)
void
Analogous toAppendable.append(CharSequence)
.void
append
(CharSequence csq, int start, int end) Analogous toAppendable.append(CharSequence, int, int)
.void
Analogous toAppendable.append(CharSequence)
which by default treats the String as a CharSequence.The buffer that has been wrapped.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.jstach.jstachio.Output
toAppendable
-
Constructor Details
-
StringOutput
Create using supplied StringBuilder.- Parameters:
buffer
- never null.
-
-
Method Details
-
append
Description copied from interface:Output
Analogous toAppendable.append(CharSequence)
.- Specified by:
append
in interfaceOutput<RuntimeException>
- Parameters:
s
- unlike appendable always non null.
-
append
Description copied from interface:Output
Analogous toAppendable.append(CharSequence)
which by default treats the String as a CharSequence.- Specified by:
append
in interfaceOutput<RuntimeException>
- Parameters:
s
- unlike appendable always non null.
-
append
Description copied from interface:Output
Analogous toAppendable.append(CharSequence, int, int)
.- Specified by:
append
in interfaceOutput<RuntimeException>
- Parameters:
csq
- Unlike appendable never null.start
- start inclusiveend
- end exclusive
-
append
Description copied from interface:Output
Appends a character to an appendable.- Specified by:
append
in interfaceOutput<RuntimeException>
- Parameters:
c
- character
-
toString
-
append
Description copied from interface:Output
Write a long by usingString.valueOf(long)
.Implementations should override if they want different behavior or able to support appendables that can write the native type.
- Specified by:
append
in interfaceOutput<RuntimeException>
- Parameters:
b
- boolean- Throws:
RuntimeException
-
append
Description copied from interface:Output
Write a long by usingString.valueOf(long)
.Implementations should override if they want different behavior or able to support appendables that can write the native type.
- Specified by:
append
in interfaceOutput<RuntimeException>
- Parameters:
d
- double- Throws:
RuntimeException
-
append
Description copied from interface:Output
Write a int by usingString.valueOf(int)
.Implementations should override if they want different behavior or able to support appendables that can write the native type.
- Specified by:
append
in interfaceOutput<RuntimeException>
- Parameters:
i
- int- Throws:
RuntimeException
-
append
Description copied from interface:Output
Write a long by usingString.valueOf(long)
.Implementations should override if they want different behavior or able to support appendables that can write the native type.
- Specified by:
append
in interfaceOutput<RuntimeException>
- Parameters:
l
- long- Throws:
RuntimeException
-
append
Description copied from interface:Output
Write a short by usingString.valueOf(int)
- Specified by:
append
in interfaceOutput<RuntimeException>
- Parameters:
s
- short- Throws:
RuntimeException
-
getBuffer
The buffer that has been wrapped.- Returns:
- the wrapped builder
-