org.crsh.text
Class ChunkAdapter
java.lang.Object
org.crsh.text.ChunkAdapter
- All Implemented Interfaces:
- Flushable, Consumer<Object>, ScreenContext<Object>
-
public class ChunkAdapter
- extends Object
-
- implements ScreenContext<Object>
-
Method Summary |
void |
flush()
|
Class<Object> |
getConsumedType()
Returns the class of the element generic type. |
int |
getHeight()
Returns the screen height in chars. |
int |
getWidth()
Returns the screen width in chars. |
void |
provide(Object element)
Provide an element. |
void |
send()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffer
private final LinkedList<Object> buffer
-
.
renderable
private Renderable renderable
-
.
out
private final RenderAppendable out
-
.
ChunkAdapter
public ChunkAdapter(ScreenContext<Chunk> out)
getWidth
public int getWidth()
- Description copied from interface:
ScreenContext
-
Returns the screen width in chars. When the value is not positive it means the value could not be determined.
-
- Specified by:
getWidth
in interface ScreenContext<Object>
-
- Returns:
- the term width
getHeight
public int getHeight()
- Description copied from interface:
ScreenContext
-
Returns the screen height in chars. When the value is not positive it means the value could not be determined.
-
- Specified by:
getHeight
in interface ScreenContext<Object>
-
- Returns:
- the term height
getConsumedType
public Class<Object> getConsumedType()
- Description copied from interface:
Consumer
-
Returns the class of the element generic type.
-
- Specified by:
getConsumedType
in interface Consumer<Object>
-
- Returns:
- the consumed type
provide
public void provide(Object element)
throws IOException
- Description copied from interface:
Consumer
-
Provide an element.
-
- Specified by:
provide
in interface Consumer<Object>
-
- Parameters:
element
- the provided element
- Throws:
IOException
flush
public void flush()
throws IOException
-
- Specified by:
flush
in interface Flushable
-
- Throws:
IOException
send
public void send()
throws IOException
-
-
- Throws:
IOException
Copyright © 2014 eXo Platform SAS. All Rights Reserved.