org.crsh.text
Class RenderWriter

java.lang.Object
  extended by java.io.Writer
      extended by org.crsh.text.RenderWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, IOContext<Chunk>, Pipe<Chunk>

public class RenderWriter
extends Writer
implements IOContext<Chunk>


Field Summary
private  Closeable closeable
          .
private  boolean closed
          .
private  boolean empty
          .
private  IOContext out
          .
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
RenderWriter(IOContext out)
           
RenderWriter(IOContext out, Closeable closeable)
           
 
Method Summary
 void close()
           
 void flush()
           
 int getHeight()
          Returns the term height in chars.
 int getWidth()
          Returns the term width in chars.
 boolean isEmpty()
           
 void provide(Chunk element)
          Provide an element.
 void write(char[] cbuf, int off, int len)
           
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

private final IOContext out
.


closeable

private final Closeable closeable
.


closed

private boolean closed
.


empty

private boolean empty
.

Constructor Detail

RenderWriter

public RenderWriter(IOContext out)
             throws NullPointerException
Throws:
NullPointerException

RenderWriter

public RenderWriter(IOContext out,
                    Closeable closeable)
             throws NullPointerException
Throws:
NullPointerException
Method Detail

isEmpty

public boolean isEmpty()

getWidth

public int getWidth()
Description copied from interface: IOContext
Returns the term width in chars. When the value is not positive it means the value could not be determined.

Specified by:
getWidth in interface IOContext<Chunk>
Returns:
the term width

getHeight

public int getHeight()
Description copied from interface: IOContext
Returns the term height in chars. When the value is not positive it means the value could not be determined.

Specified by:
getHeight in interface IOContext<Chunk>
Returns:
the term height

provide

public void provide(Chunk element)
             throws IOException
Description copied from interface: Pipe
Provide an element.

Specified by:
provide in interface Pipe<Chunk>
Parameters:
element - the provided element
Throws:
IOException

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
Specified by:
write in class Writer
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Specified by:
flush in class Writer
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class Writer
Throws:
IOException


Copyright © 2012 eXo Platform SAS. All Rights Reserved.