com.caucho.vfs
Class StreamPrintWriter

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

public class StreamPrintWriter
extends java.io.PrintWriter
implements FlushBuffer, EnclosedWriteStream

A print writer which writes to a specific WriteStream.


Field Summary
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
StreamPrintWriter(WriteStream out)
          Creates a new PrintWriterImpl
 
Method Summary
 void close()
           
 void flush()
          Flushes the writer.
 void flushBuffer()
          Flushes the writer.
 WriteStream getWriteStream()
           
 void print(char ch)
          Prints a character.
 void print(char[] v)
          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 v)
          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 v)
          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[] v)
          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 v)
          Writes a string followed by a newline.
 void write(char[] buf)
          Writes a character buffer.
 void write(char[] buf, int offset, int length)
          Writes a character.
 void write(int ch)
          Writes a character.
 void write(java.lang.String v)
          Writes a string
 void write(java.lang.String v, int offset, int length)
          Writes a string
 
Methods inherited from class java.io.PrintWriter
append, append, append, checkError, clearError, format, format, print, printf, printf, setError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamPrintWriter

public StreamPrintWriter(WriteStream out)
Creates a new PrintWriterImpl

Method Detail

write

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

Overrides:
write in class java.io.PrintWriter

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

write

public final void write(java.lang.String v)
Writes a string

Overrides:
write in class java.io.PrintWriter

write

public final void write(java.lang.String v,
                        int offset,
                        int length)
Writes a string

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 v)
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[] v)
Prints a character array

Overrides:
print in class java.io.PrintWriter

print

public final void print(java.lang.String v)
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[] v)
Writes a character array followed by a newline.

Overrides:
println in class java.io.PrintWriter

println

public final void println(java.lang.String v)
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

getWriteStream

public WriteStream getWriteStream()
Specified by:
getWriteStream in interface EnclosedWriteStream

close

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