Top Description Methods
org.apache.derby.shared.common.stream

public Interface HeaderPrintWriter

Imports
java.io.PrintWriter

A HeaderPrintWriter is like a PrintWriter with support for including a header in the output. It is expected users will use HeaderPrintWriters to prepend headings to trace and log messages.

Method Summary

Modifier and TypeMethod and Description
public void
public PrintWriterGetHeader

Returns:

the stream header
getHeader
()

Return the header for the stream.

public String

Returns:

the name of the wrapped writer or stream
getName
()

Gets the name of the wrapped writer or stream

public PrintWriter

Returns:

the print machinery
getPrintWriter
()

Gets a PrintWriter object for writing to this HeaderPrintWriter.

public void
println(String
The message to print
message
)

Print a message with a newline.

public void
println(Object
The message to print
message
)

Print a message with a newline.

public void
printlnWithHeader(String
Message to print
message
)

Puts out some setup info for the current write and the write(s) that will be put out next.

Method Detail

flushback to summary
public void flush()
See Also
java.io.PrintWriter#flush
getHeaderback to summary
public PrintWriterGetHeader getHeader()

Return the header for the stream.

Returns:PrintWriterGetHeader

the stream header

getNameback to summary
public String getName()

Gets the name of the wrapped writer or stream

Returns:String

the name of the wrapped writer or stream

getPrintWriterback to summary
public PrintWriter getPrintWriter()

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.

Returns:PrintWriter

the print machinery

printlnback to summary
public void println(String message)

Print a message with a newline.

Parameters
message:String

The message to print

See Also
java.io.PrintWriter#println
printlnback to summary
public void println(Object message)

Print a message with a newline.

Parameters
message:Object

The message to print

See Also
java.io.PrintWriter#println
printlnWithHeaderback to summary
public void printlnWithHeader(String message)

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.

Parameters
message:String

Message to print