com.caucho.vfs
Class PrintWriterImpl

java.lang.Object
  extended by java.io.Writer
      extended by java.io.PrintWriter
          extended by com.caucho.vfs.PrintWriterImpl
All Implemented Interfaces:
FlushBuffer, java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class PrintWriterImpl
extends java.io.PrintWriter
implements FlushBuffer

A print writer which allows for a changing writer.


Field Summary
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
PrintWriterImpl()
          Creates a new PrintWriterImpl
PrintWriterImpl(java.io.Writer out)
          Creates a new PrintWriterImpl
 
Method Summary
 void close()
           
 void flush()
          Flushes the writer.
 void flushBuffer()
          Flushes the writer.
 void print(char ch)
          Prints a character.
 void print(char[] s)
          Prints a character array
 void print(double v)
          Prints a double followed by a newline.
 void print(float v)
          Prints a double followed by a newline.
 void print(int i)
          Prints an integer.
 void print(long v)
          Prints a long.
 void print(java.lang.Object v)
          Prints the value of the object.
 void print(java.lang.String s)
          Prints a string.
 void println()
          Prints the newline.
 void println(boolean v)
          Prints the boolean followed by a newline.
 void println(char v)
          Prints a character followed by a newline.
 void println(char[] s)
          Writes a character array followed by a newline.
 void println(double v)
          Prints a double followed by a newline.
 void println(float v)
          Prints a float followed by a newline.
 void println(int v)
          Prints an integer followed by a newline.
 void println(long v)
          Prints a long followed by a newline.
 void println(java.lang.Object v)
          Writes an object followed by a newline.
 void println(java.lang.String s)
          Writes a string followed by a newline.
 void setWriter(java.io.Writer out)
          Sets the underlying writer.
 void write(char ch)
          Writes a character.
 void write(char[] buf)
          Writes a character buffer.
 void write(char[] buf, int offset, int length)
          Writes a character.
 
Methods inherited from class java.io.PrintWriter
append, append, append, checkError, clearError, format, format, print, printf, printf, setError, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintWriterImpl

public PrintWriterImpl()
Creates a new PrintWriterImpl


PrintWriterImpl

public PrintWriterImpl(java.io.Writer out)
Creates a new PrintWriterImpl

Method Detail

setWriter

public void setWriter(java.io.Writer out)
Sets the underlying writer.


write

public final void write(char ch)
Writes a character.


write

public final void write(char[] buf,
                        int offset,
                        int length)
Writes a character.

Overrides:
write in class java.io.PrintWriter

write

public final void write(char[] buf)
Writes a character buffer.

Overrides:
write in class java.io.PrintWriter

print

public final void print(char ch)
Prints a character.

Overrides:
print in class java.io.PrintWriter

print

public final void print(int i)
Prints an integer.

Overrides:
print in class java.io.PrintWriter

print

public final void print(long v)
Prints a long.

Overrides:
print in class java.io.PrintWriter

print

public final void print(float v)
Prints a double followed by a newline.

Overrides:
print in class java.io.PrintWriter
Parameters:
v - the value to print

print

public final void print(double v)
Prints a double followed by a newline.

Overrides:
print in class java.io.PrintWriter
Parameters:
v - the value to print

print

public final void print(char[] s)
Prints a character array

Overrides:
print in class java.io.PrintWriter

print

public final void print(java.lang.String s)
Prints a string.

Overrides:
print in class java.io.PrintWriter

print

public final void print(java.lang.Object v)
Prints the value of the object.

Overrides:
print in class java.io.PrintWriter

println

public final void println()
Prints the newline.

Overrides:
println in class java.io.PrintWriter

println

public final void println(boolean v)
Prints the boolean followed by a newline.

Overrides:
println in class java.io.PrintWriter
Parameters:
v - the value to print

println

public final void println(char v)
Prints a character followed by a newline.

Overrides:
println in class java.io.PrintWriter
Parameters:
v - the value to print

println

public final void println(int v)
Prints an integer followed by a newline.

Overrides:
println in class java.io.PrintWriter
Parameters:
v - the value to print

println

public final void println(long v)
Prints a long followed by a newline.

Overrides:
println in class java.io.PrintWriter
Parameters:
v - the value to print

println

public final void println(float v)
Prints a float followed by a newline.

Overrides:
println in class java.io.PrintWriter
Parameters:
v - the value to print

println

public final void println(double v)
Prints a double followed by a newline.

Overrides:
println in class java.io.PrintWriter
Parameters:
v - the value to print

println

public final void println(char[] s)
Writes a character array followed by a newline.

Overrides:
println in class java.io.PrintWriter

println

public final void println(java.lang.String s)
Writes a string followed by a newline.

Overrides:
println in class java.io.PrintWriter

println

public final void println(java.lang.Object v)
Writes an object followed by a newline.

Overrides:
println in class java.io.PrintWriter

flush

public void flush()
Flushes the writer.

Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.PrintWriter

flushBuffer

public void flushBuffer()
Flushes the writer.

Specified by:
flushBuffer in interface FlushBuffer

close

public void close()
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.PrintWriter