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()
Buffered
bufferSize
in interface Buffered
public boolean terminate()
public boolean isTruncated()
public void write(char[] cbuf, int off, int len) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class Snippet.PassthroughWriter
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class Snippet.PassthroughWriter
java.io.IOException
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.