@NotThreadSafe public final class StringBuilderPercentEncoderOutputHandler extends java.lang.Object implements PercentEncoderOutputHandler
| Constructor and Description |
|---|
StringBuilderPercentEncoderOutputHandler()
Create a new handler with a default size StringBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
ensureCapacity(int length)
Ensure the internal buffer has enough capacity for the specified length of input.
|
java.lang.String |
getContents() |
void |
onOutputChar(char c)
Called on each character output by a PercentEncoder.
|
void |
reset()
Clear the buffer.
|
public StringBuilderPercentEncoderOutputHandler()
@Nonnull public java.lang.String getContents()
public void reset()
public void ensureCapacity(int length)
length - length to ensure capacity forpublic void onOutputChar(char c)
PercentEncoderOutputHandleronOutputChar in interface PercentEncoderOutputHandlerc - output character that's either in the calling PercentEncoder's safe char set or part of a
percent-hex-encoded triple, e.g. "%FF".