org.crsh.text
Class RenderWriter
java.lang.Object
java.io.Writer
org.crsh.text.RenderWriter
- All Implemented Interfaces:
- Closeable, Flushable, Appendable, Consumer<Chunk>, ScreenContext<Chunk>
-
public class RenderWriter
- extends Writer
-
- implements ScreenContext<Chunk>
-
Fields inherited from class java.io.Writer |
lock |
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 |
out
private final ScreenContext out
-
.
closeable
private final Closeable closeable
-
.
closed
private boolean closed
-
.
empty
private boolean empty
-
.
RenderWriter
public RenderWriter(ScreenContext out)
throws NullPointerException
-
- Throws:
NullPointerException
RenderWriter
public RenderWriter(ScreenContext out,
Closeable closeable)
throws NullPointerException
-
- Throws:
NullPointerException
isEmpty
public boolean isEmpty()
-
-
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<Chunk>
-
- 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<Chunk>
-
- Returns:
- the term height
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
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 © 2014 eXo Platform SAS. All Rights Reserved.