xdoclet.template
Class PrettyPrintWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.PrintWriter
          extended by xdoclet.template.PrettyPrintWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class PrettyPrintWriter
extends java.io.PrintWriter

Extends the PrintWriter class by adding the possibility of emiting empty lines.

Version:
$Revision: 1.5 $
Author:
Andreas "Mad" Schaefer (andreas.schaefer@madplane.com), Ara Abrahamian (ara_e@email.com)
created
March 7, 2001

Field Summary
static java.lang.String LINE_SEPARATOR
          Convenience variable for printing and matching line separators in a system portable manner.
static int LINE_SEPARATOR_LEN
           
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
PrettyPrintWriter(java.io.OutputStream pOut)
          Describe what the PrettyPrintWriter constructor does
PrettyPrintWriter(java.io.Writer pOut)
          Describe what the PrettyPrintWriter constructor does
PrettyPrintWriter(java.io.Writer pOut, boolean pAutoFlush)
          Describe what the PrettyPrintWriter constructor does
 
Method Summary
 void close()
          Closes the output stream and writes the last line.
 void println()
           
 void write(char[] pBuffer, int pOffset, int pLength)
          Describe what the method does
 void write(int c)
           
 void write(java.lang.String pText, int pOffset, int pLength)
          Describe what the method does
protected  void writeLine()
           
 
Methods inherited from class java.io.PrintWriter
append, append, append, checkError, clearError, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, setError, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINE_SEPARATOR

public static final java.lang.String LINE_SEPARATOR
Convenience variable for printing and matching line separators in a system portable manner.

See Also:
Constant Field Values

LINE_SEPARATOR_LEN

public static final int LINE_SEPARATOR_LEN
Constructor Detail

PrettyPrintWriter

public PrettyPrintWriter(java.io.OutputStream pOut)
Describe what the PrettyPrintWriter constructor does

Parameters:
pOut - Describe what the parameter does

PrettyPrintWriter

public PrettyPrintWriter(java.io.Writer pOut)
Describe what the PrettyPrintWriter constructor does

Parameters:
pOut - Describe what the parameter does

PrettyPrintWriter

public PrettyPrintWriter(java.io.Writer pOut,
                         boolean pAutoFlush)
Describe what the PrettyPrintWriter constructor does

Parameters:
pOut - Describe what the parameter does
pAutoFlush - Describe what the parameter does
Method Detail

close

public void close()
Closes the output stream and writes the last line.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.PrintWriter

write

public void write(char[] pBuffer,
                  int pOffset,
                  int pLength)
Describe what the method does

Overrides:
write in class java.io.PrintWriter
Parameters:
pBuffer - Describe what the parameter does
pOffset - Describe what the parameter does
pLength - Describe what the parameter does

write

public void write(int c)
Overrides:
write in class java.io.PrintWriter

write

public void write(java.lang.String pText,
                  int pOffset,
                  int pLength)
Describe what the method does

Overrides:
write in class java.io.PrintWriter
Parameters:
pText - Describe what the parameter does
pOffset - Describe what the parameter does
pLength - Describe what the parameter does

println

public void println()
Overrides:
println in class java.io.PrintWriter

writeLine

protected void writeLine()

http://xdoclet.sourceforge.net/