|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.japaki.text.ParseWriter
net.sf.japaki.text.WriterWithPosition
public class WriterWithPosition
The default implementation for a ParseWriter.
| Constructor Summary | |
|---|---|
WriterWithPosition(String fileName)
Creates a new WriterWithPosition based on the specified file. |
|
WriterWithPosition(Writer writer)
Creates a new WriterWithPosition based on the specified writer. |
|
| Method Summary | |
|---|---|
Appendable |
append(char c)
|
Appendable |
append(CharSequence scq)
|
Appendable |
append(CharSequence scq,
int start,
int end)
|
void |
close()
|
void |
copyFrom(ParseWriter source)
Copies all values from the source object After the copy, this object behaves like the source. |
ParseWriter |
deepCopy()
Provides a deep copy of this object. |
void |
flush()
|
Deque<Parser> |
getPath()
Returns the path of parsers in the parser network. |
Writer |
getWriter()
Returns the underlying writer. |
void |
newLine()
Inserts a line break in the output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WriterWithPosition(Writer writer)
WriterWithPosition based on the specified writer.
writer - base writer
NullPointerException - if writer is null
public WriterWithPosition(String fileName)
throws IOException
WriterWithPosition based on the specified file.
fileName - name of the output file
IOException - see FileWriter.FileWriter(String)| Method Detail |
|---|
public Writer getWriter()
public void newLine()
throws IOException
ParseWriter
newLine in class ParseWriterIOException - if an I/O error occurspublic Deque<Parser> getPath()
PathTracker
getPath in interface PathTrackerpublic ParseWriter deepCopy()
RestorableIO
deepCopy in interface RestorableIO<ParseWriter>
public void copyFrom(ParseWriter source)
throws IOException
RestorableIO
copyFrom in interface RestorableIO<ParseWriter>source - the source instance. Compatibility depends on the
implementing class. In the standard case it should be the result of a
prior call to RestorableIO.deepCopy().
IOException - if an I/O error occurs
public Appendable append(CharSequence scq)
throws IOException
append in interface AppendableIOException
public Appendable append(CharSequence scq,
int start,
int end)
throws IOException
append in interface AppendableIOException
public Appendable append(char c)
throws IOException
append in interface AppendableIOException
public void close()
throws IOException
close in interface CloseableIOException
public void flush()
throws IOException
flush in interface FlushableIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||