public final class BufferUtil extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_CONTENT_FROM_END_TO_CUT |
Modifier and Type | Method and Description |
---|---|
static void |
flushBuffer(StringBuilder buffer,
Writer out,
boolean cutWisely)
Flushes the buffer to output stream.
|
public static final int MAX_CONTENT_FROM_END_TO_CUT
public static void flushBuffer(StringBuilder buffer, Writer out, boolean cutWisely) throws IOException
MAX_CONTENT_FROM_END_TO_CUT
. The remaining
content after the cut location will remain in the buffer for further use.
If the output writer is null, it will simply truncate the buffer content
without writing it anywhere.buffer
- the buffer to flushout
- where to write the buffer contentcutWisely
- whether to "cut" wisely the buffer contentIOException
- when there is a problem flushing the bufferCopyright © 2009–2021 Norconex Inc.. All rights reserved.