org.crsh.text
Class ChunkAdapter

java.lang.Object
  extended by org.crsh.text.ChunkAdapter
All Implemented Interfaces:
Flushable, ScreenContext

public class ChunkAdapter
extends Object
implements ScreenContext


Field Summary
private  LinkedList<Object> buffer
          .
private  RenderAppendable out
          .
private  Renderable renderable
          .
 
Constructor Summary
ChunkAdapter(ScreenContext out)
           
 
Method Summary
 void flush()
           
 Class<Object> getConsumedType()
           
 int getHeight()
          Returns the screen height in chars.
 int getWidth()
          Returns the screen width in chars.
 void provide(Object element)
           
 void send()
           
 void write(Chunk chunk)
          Write a chunk to the screen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

private final LinkedList<Object> buffer
.


renderable

private Renderable renderable
.


out

private final RenderAppendable out
.

Constructor Detail

ChunkAdapter

public ChunkAdapter(ScreenContext out)
Method Detail

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
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
Returns:
the term height

getConsumedType

public Class<Object> getConsumedType()

write

public void write(Chunk chunk)
           throws IOException
Description copied from interface: ScreenContext
Write a chunk to the screen.

Specified by:
write in interface ScreenContext
Parameters:
chunk - the chunk
Throws:
IOException - any io exception

provide

public void provide(Object element)
             throws IOException
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 © 2013 eXo Platform SAS. All Rights Reserved.