java.lang.Object
java.io.Writer
java.io.PrintWriter
org.apache.derby.impl.services.stream.BasicHeaderPrintWriter
- All Implemented Interfaces:
- org.apache.derby.iapi.services.stream.HeaderPrintWriter
- class BasicHeaderPrintWriter
- extends java.io.PrintWriter
- implements org.apache.derby.iapi.services.stream.HeaderPrintWriter
Basic class to print lines with headers.
STUB: Should include code to emit a new line before a header
which is not the first thing on the line.
| Methods inherited from class java.io.PrintWriter |
checkError, close, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
headerGetter
private final org.apache.derby.iapi.services.stream.PrintWriterGetHeader headerGetter
canClose
private final boolean canClose
name
private final java.lang.String name
BasicHeaderPrintWriter
BasicHeaderPrintWriter(java.io.OutputStream writeTo,
org.apache.derby.iapi.services.stream.PrintWriterGetHeader headerGetter,
boolean canClose,
java.lang.String streamName)
- the constructor sets up the HeaderPrintWriter.
BasicHeaderPrintWriter
BasicHeaderPrintWriter(java.io.Writer writeTo,
org.apache.derby.iapi.services.stream.PrintWriterGetHeader headerGetter,
boolean canClose,
java.lang.String writerName)
- the constructor sets up the HeaderPrintWriter.
printlnWithHeader
public void printlnWithHeader(java.lang.String message)
- Description copied from interface:
org.apache.derby.iapi.services.stream.HeaderPrintWriter
- Puts out some setup info for
the current write and the write(s) that will be put out next.
It ends with a \n\r.
All other writes to the stream use the
PrintStream interface.
- Specified by:
printlnWithHeader in interface org.apache.derby.iapi.services.stream.HeaderPrintWriter
getHeader
public org.apache.derby.iapi.services.stream.PrintWriterGetHeader getHeader()
- Description copied from interface:
org.apache.derby.iapi.services.stream.HeaderPrintWriter
- Return the header for the stream.
- Specified by:
getHeader in interface org.apache.derby.iapi.services.stream.HeaderPrintWriter
getPrintWriter
public java.io.PrintWriter getPrintWriter()
- Description copied from interface:
org.apache.derby.iapi.services.stream.HeaderPrintWriter
- Gets a PrintWriter object for writing to this HeaderPrintWriter.
Users may use the HeaderPrintWriter to access methods not included
in this interface or to invoke methods or constructors which require
a PrintWriter.
Interleaving calls to a printWriter and its associated HeaderPrintWriter
is not supported.
- Specified by:
getPrintWriter in interface org.apache.derby.iapi.services.stream.HeaderPrintWriter
getName
public java.lang.String getName()
- Description copied from interface:
org.apache.derby.iapi.services.stream.HeaderPrintWriter
- Gets the name of the wrapped writer or stream
- Specified by:
getName in interface org.apache.derby.iapi.services.stream.HeaderPrintWriter
complete
void complete()
- Flushes stream, and optionally also closes it if constructed
with canClose equal to true.