@Deprecated public class WriterBackend extends java.lang.Object implements Backend
Backend
which writes all output to a java.io.Writer.
The mark(Object o)
method does nothing in this implementation.
There is a method count()
which returns the number of characters
written by this so far.
This class is the cause for numerous unnecessary "throws IOException" clauses
throughout the entire project. It should be removed and replaced by StringBackend.
(Kai Wallisch 09/2014)Modifier and Type | Field and Description |
---|---|
protected int |
count
Deprecated.
|
protected int |
lineWidth
Deprecated.
|
protected java.io.Writer |
out
Deprecated.
|
Constructor and Description |
---|
WriterBackend(java.io.Writer w,
int lineWidth)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Closes this backend
|
int |
count()
Deprecated.
Returns the number of characters written through this backend.
|
void |
flush()
Deprecated.
Flushes any buffered output
|
int |
lineWidth()
Deprecated.
Returns the available space per line
|
void |
mark(java.lang.Object o)
Deprecated.
Gets called to record a
mark() call in the input. |
int |
measure(java.lang.String s)
Deprecated.
Returns the space required to print the String
s |
void |
newLine()
Deprecated.
Start a new line.
|
void |
print(java.lang.String s)
Deprecated.
Append a String
s to the output. |
protected java.io.Writer out
protected int lineWidth
protected int count
public void print(java.lang.String s) throws java.io.IOException
s
to the output. s
contains no newlines.public void newLine() throws java.io.IOException
public void close() throws java.io.IOException
public void flush() throws java.io.IOException
public void mark(java.lang.Object o)
mark()
call in the input.public int count()
public int lineWidth()