class Snippet.Buffer.SnippetWriter extends Snippet.PassthroughWriter implements Buffered
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
Snippet.Buffer.SnippetWriter.Completed
Signifies the last write was fully written, but there is
no more space for future writes.
|
(package private) class |
Snippet.Buffer.SnippetWriter.Truncated
Signifies the last write was not completely written and there was
no more space for this or future writes.
|
(package private) class |
Snippet.Buffer.SnippetWriter.Writing |
| Modifier and Type | Field and Description |
|---|---|
private java.io.ByteArrayOutputStream |
buffer |
private int |
max |
private Snippet.PassthroughWriter |
mode |
| Constructor and Description |
|---|
SnippetWriter(int max) |
| Modifier and Type | Method and Description |
|---|---|
int |
bufferSize()
The buffer size used by this stream while reading input or before writing
output to the underlying stream.
|
void |
close() |
void |
flush() |
java.lang.String |
get() |
boolean |
isTruncated() |
boolean |
terminate()
Calling this method implies the need to continue
writing and a question on if that is ok.
|
void |
write(char[] cbuf,
int off,
int len) |
private final java.io.ByteArrayOutputStream buffer
private final int max
private Snippet.PassthroughWriter mode
public java.lang.String get()
public int bufferSize()
BufferedbufferSize in interface Bufferedpublic boolean terminate()
public boolean isTruncated()
public void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class Snippet.PassthroughWriterjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class Snippet.PassthroughWriterjava.io.IOExceptionCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.