org.crsh.text
Class ChunkAdapter

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

public class ChunkAdapter
extends Object
implements Consumer<Object>

A Consumer<Object> that renders the object stream to a ScreenContext.


Field Summary
private  LinkedList<Object> buffer
          Buffers objects of the same kind.
private  RenderAppendable out
          .
private  Renderer renderable
          .
 
Constructor Summary
ChunkAdapter(ScreenContext out)
           
 
Method Summary
 void flush()
           
 Class<Object> getConsumedType()
          Returns the class of the element generic type.
 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
 

Field Detail

buffer

private final LinkedList<Object> buffer
Buffers objects of the same kind.


renderable

private Renderer renderable
.


out

private final RenderAppendable out
.

Constructor Detail

ChunkAdapter

public ChunkAdapter(ScreenContext out)
Method Detail

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.