org.crsh.text
Class ChunkBuffer
java.lang.Object
org.crsh.text.ChunkBuffer
- All Implemented Interfaces:
- Flushable, Serializable, Iterable<Chunk>, Consumer<Chunk>
-
public class ChunkBuffer
- extends Object
-
- implements Iterable<Chunk>, Serializable, Consumer<Chunk>
-
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
chunks
private final LinkedList<Chunk> chunks
-
.
current
private Style current
-
.
next
private Style next
-
.
out
private final Consumer<Chunk> out
-
Where we flush.
ChunkBuffer
public ChunkBuffer()
ChunkBuffer
public ChunkBuffer(Consumer<Chunk> out)
iterator
public Iterator<Chunk> iterator()
-
- Specified by:
iterator
in interface Iterable<Chunk>
-
writeAnsiTo
@Deprecated
public void writeAnsiTo(Appendable appendable)
throws IOException
-
Deprecated.
-
-
- Throws:
IOException
append
public ChunkBuffer append(Iterable<?> data)
throws NullPointerException
-
-
- Throws:
NullPointerException
append
public ChunkBuffer append(Object... data)
throws NullPointerException
-
-
- Throws:
NullPointerException
cls
public ChunkBuffer cls()
-
-
append
public ChunkBuffer append(Style style)
throws NullPointerException
-
-
- Throws:
NullPointerException
append
public ChunkBuffer append(char c)
-
-
append
public ChunkBuffer append(CharSequence s)
-
-
append
public ChunkBuffer append(CharSequence s,
int start,
int end)
-
-
last
private Text last()
-
-
getConsumedType
public Class<Chunk> getConsumedType()
- Description copied from interface:
Consumer
-
Returns the class of the element generic type.
-
- Specified by:
getConsumedType
in interface Consumer<Chunk>
-
- Returns:
- the consumed type
provide
public void provide(Chunk element)
throws IOException
- Description copied from interface:
Consumer
-
Provide an element.
-
- Specified by:
provide
in interface Consumer<Chunk>
-
- Parameters:
element
- the provided element
- Throws:
IOException
flush
public void flush()
throws IOException
-
- Specified by:
flush
in interface Flushable
-
- Throws:
IOException
append
public ChunkBuffer append(ChunkBuffer s)
throws NullPointerException
-
-
- Throws:
NullPointerException
write
public void write(Chunk chunk)
throws NullPointerException
-
-
- Throws:
NullPointerException
append
public ChunkBuffer append(Object o)
throws NullPointerException
-
-
- Throws:
NullPointerException
contains
public boolean contains(Object o)
-
-
isEmpty
public boolean isEmpty()
-
-
clear
public void clear()
-
-
hashCode
public int hashCode()
-
- Overrides:
hashCode
in class Object
-
equals
public boolean equals(Object obj)
-
- Overrides:
equals
in class Object
-
toString
public String toString()
-
- Overrides:
toString
in class Object
-
writeTo
public void writeTo(Consumer<Chunk> writer)
throws IOException
-
-
- Throws:
IOException
Copyright © 2014 eXo Platform SAS. All Rights Reserved.