Module io.jstach.jstachio
Package io.jstach.jstachio.output
Class ForwardingOutput<E extends Exception>
java.lang.Object
io.jstach.jstachio.output.ForwardingOutput<E>
- Type Parameters:
E
- error throw on any append or write
- All Implemented Interfaces:
Output<E>
- Direct Known Subclasses:
ForwardingEncodedOutput
An encoded output that forwards all calls to a delegate.
-
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.delegate()
The output to forward to.Converts the output to an appendable unless it already is one.
-
Constructor Details
-
ForwardingOutput
protected ForwardingOutput()Do nothing constructor
-
-
Method Details
-
delegate
The output to forward to.- Returns:
- output to forward to.
-
append
Description copied from interface:Output
Analogous toAppendable.append(CharSequence)
. -
append
Description copied from interface:Output
Write a short by usingString.valueOf(int)
-
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.
-
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.
-
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.
-
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.
-
toAppendable
Description copied from interface:Output
Converts the output to an appendable unless it already is one.- Specified by:
toAppendable
in interfaceOutput<E extends Exception>
- Returns:
- adapted appendable of this output.
-
append
Description copied from interface:Output
Appends a character to an appendable. -
append
Description copied from interface:Output
Analogous toAppendable.append(CharSequence)
which by default treats the String as a CharSequence. -
append
Description copied from interface:Output
Analogous toAppendable.append(CharSequence, int, int)
.
-