public class ChunkBuffer extends Object implements Iterable<Chunk>, Serializable, Consumer<Chunk>
| Modifier and Type | Field and Description |
|---|---|
private LinkedList<Chunk> |
chunks
.
|
private Style |
current
.
|
private Style |
next
.
|
private Consumer<Chunk> |
out
Where we flush.
|
| Constructor and Description |
|---|
ChunkBuffer() |
ChunkBuffer(Consumer<Chunk> out) |
| Modifier and Type | Method and Description |
|---|---|
ChunkBuffer |
append(CharSequence s) |
ChunkBuffer |
append(CharSequence s,
int start,
int end) |
ChunkBuffer |
append(ChunkBuffer s) |
ChunkBuffer |
append(Iterable<?> data) |
ChunkBuffer |
append(Object... data) |
ChunkBuffer |
append(Object o) |
ChunkBuffer |
append(Style style) |
ChunkBuffer |
append(Text text) |
void |
clear() |
ChunkBuffer |
cls() |
boolean |
contains(Object o) |
boolean |
equals(Object obj) |
void |
flush() |
void |
format(Format format,
Appendable appendable) |
Class<Chunk> |
getConsumedType()
Returns the class of the element generic type.
|
int |
hashCode() |
boolean |
isEmpty() |
Iterator<Chunk> |
iterator() |
void |
provide(Chunk element)
Provide an element.
|
String |
toString() |
void |
write(Chunk chunk) |
private final LinkedList<Chunk> chunks
public ChunkBuffer()
public ChunkBuffer(Consumer<Chunk> out)
public void format(Format format, Appendable appendable) throws IOException
IOExceptionpublic ChunkBuffer append(Iterable<?> data) throws NullPointerException
NullPointerExceptionpublic ChunkBuffer append(Object... data) throws NullPointerException
NullPointerExceptionpublic ChunkBuffer cls()
public ChunkBuffer append(Style style) throws NullPointerException
NullPointerExceptionpublic ChunkBuffer append(Text text)
public ChunkBuffer append(CharSequence s)
public ChunkBuffer append(CharSequence s, int start, int end)
public Class<Chunk> getConsumedType()
ConsumergetConsumedType in interface Consumer<Chunk>public void provide(Chunk element) throws IOException
Consumerprovide in interface Consumer<Chunk>element - the provided elementIOExceptionpublic void flush() throws IOException
flush in interface FlushableIOExceptionpublic ChunkBuffer append(ChunkBuffer s) throws NullPointerException
NullPointerExceptionpublic void write(Chunk chunk) throws NullPointerException
NullPointerExceptionpublic ChunkBuffer append(Object o) throws NullPointerException
NullPointerExceptionpublic boolean isEmpty()
public void clear()
Copyright © 2014 eXo Platform SAS. All Rights Reserved.