Top Description Inners Fields Constructors Methods
com.sun.faces.application

public Class WebPrintWriter

extends PrintWriter
Class Inheritance
Imports
java.io.IOException, .PrintWriter, .Writer

A simple PrintWriter implementation to allow us to query whether or not the writer has been flushed or closed. This is necessary to better mimic the actual Servlet response.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private boolean
public static final Writer
Inherited from java.io.PrintWriter:
out

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides java.io.PrintWriter.close.

Implements java.io.Closeable.close.

Closes the stream and releases any system resources associated with it.

public void
flush()

Overrides java.io.PrintWriter.flush.

Implements java.io.Flushable.flush.

Flushes the stream.

public boolean
Inherited from java.io.PrintWriter:
appendappendappendcheckErrorclearErrorformatformatprintprintprintprintprintprintprintprintprintprintfprintfprintlnprintlnprintlnprintlnprintlnprintlnprintlnprintlnprintlnprintlnsetErrorwritewritewritewritewrite

Field Detail

committedback to summary
private boolean committed
NOOP_WRITERback to summary
public static final Writer NOOP_WRITER

Constructor Detail

WebPrintWriterback to summary
public WebPrintWriter(Writer delegate)

Method Detail

closeback to summary
public void close()

Overrides java.io.PrintWriter.close.

Implements java.io.Closeable.close.

Doc from java.io.PrintWriter.close.

Closes the stream and releases any system resources associated with it. Closing a previously closed stream has no effect.

Annotations
@Override
flushback to summary
public void flush()

Overrides java.io.PrintWriter.flush.

Implements java.io.Flushable.flush.

Doc from java.io.PrintWriter.flush.

Flushes the stream.

Annotations
@Override
isComittedback to summary
public boolean isComitted()
com.sun.faces.application back to summary

private Class WebPrintWriter.NoOpWriter

extends Writer
Class Inheritance

Field Summary

Inherited from java.io.Writer:
lock

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Writer
append(CharSequence
The character sequence to append. If csq is null, then the four characters "null" are appended to this writer.
csq
)

Overrides java.io.Writer.append.

Implements java.lang.Appendable.append.

Appends the specified character sequence to this writer.

public Writer
append(CharSequence
The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null".
csq
,
int
The index of the first character in the subsequence
start
,
int
The index of the character following the last character in the subsequence
end
)

Overrides java.io.Writer.append.

Implements java.lang.Appendable.append.

Appends a subsequence of the specified character sequence to this writer.

public Writer
append(char
The 16-bit character to append
c
)

Overrides java.io.Writer.append.

Implements java.lang.Appendable.append.

Appends the specified character to this writer.

public void
close()

Implements abstract java.io.Writer.close.

Implements java.io.Closeable.close.

Closes the stream, flushing it first.

public void
flush()

Implements abstract java.io.Writer.flush.

Implements java.io.Flushable.flush.

Flushes the stream.

public void
write(char[]
Array of characters
cbuf
,
int
Offset from which to start writing characters
off
,
int
Number of characters to write
len
)

Implements abstract java.io.Writer.write.

Writes a portion of an array of characters.

public void
write(int
int specifying a character to be written
c
)

Overrides java.io.Writer.write.

Writes a single character.

public void
write(char[]
Array of characters to be written
cbuf
)

Overrides java.io.Writer.write.

Writes an array of characters.

public void
write(String
String to be written
str
)

Overrides java.io.Writer.write.

Writes a string.

public void
write(String
A String
str
,
int
Offset from which to start writing characters
off
,
int
Number of characters to write
len
)

Overrides java.io.Writer.write.

Writes a portion of a string.

Inherited from java.io.Writer:
nullWriter

Constructor Detail

NoOpWriterback to summary
public NoOpWriter()

Method Detail

appendback to summary
public Writer append(CharSequence csq) throws IOException

Overrides java.io.Writer.append.

Implements java.lang.Appendable.append.

Doc from java.io.Writer.append.

Appends the specified character sequence to this writer.

An invocation of this method of the form out.append(csq) when csq is not null, behaves in exactly the same way as the invocation

out.write(csq.toString())
out.write(csq.toString())

Depending on the specification of toString for the character sequence csq, the entire sequence may not be appended. For instance, invoking the toString method of a character buffer will return a subsequence whose content depends upon the buffer's position and limit.

Parameters
csq:CharSequence

The character sequence to append. If csq is null, then the four characters "null" are appended to this writer.

Returns:Writer

This writer

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
appendback to summary
public Writer append(CharSequence csq, int start, int end) throws IOException

Overrides java.io.Writer.append.

Implements java.lang.Appendable.append.

Doc from java.io.Writer.append.

Appends a subsequence of the specified character sequence to this writer.

An invocation of this method of the form out.append(csq, start, end) when csq is not null behaves in exactly the same way as the invocation

out.write(csq.subSequence(start, end).toString())
out.write(csq.subSequence(start, end).toString())
Parameters
csq:CharSequence

The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null".

start:int

The index of the first character in the subsequence

end:int

The index of the character following the last character in the subsequence

Returns:Writer

This writer

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
appendback to summary
public Writer append(char c) throws IOException

Overrides java.io.Writer.append.

Implements java.lang.Appendable.append.

Doc from java.io.Writer.append.

Appends the specified character to this writer.

An invocation of this method of the form out.append(c) behaves in exactly the same way as the invocation

out.write(c)
out.write(c)
Parameters
c:char

The 16-bit character to append

Returns:Writer

This writer

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
closeback to summary
public void close() throws IOException

Implements abstract java.io.Writer.close.

Implements java.io.Closeable.close.

Doc from java.io.Writer.close.

Closes the stream, flushing it first. Once the stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously closed stream has no effect.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
flushback to summary
public void flush() throws IOException

Implements abstract java.io.Writer.flush.

Implements java.io.Flushable.flush.

Doc from java.io.Writer.flush.

Flushes the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.

If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
writeback to summary
public void write(char[] cbuf, int off, int len) throws IOException

Implements abstract java.io.Writer.write.

Doc from java.io.Writer.write.

Writes a portion of an array of characters.

Parameters
cbuf:char[]

Array of characters

off:int

Offset from which to start writing characters

len:int

Number of characters to write

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
writeback to summary
public void write(int c) throws IOException

Overrides java.io.Writer.write.

Doc from java.io.Writer.write.

Writes a single character. The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored.

Subclasses that intend to support efficient single-character output should override this method.

Parameters
c:int

int specifying a character to be written

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
writeback to summary
public void write(char[] cbuf) throws IOException

Overrides java.io.Writer.write.

Doc from java.io.Writer.write.

Writes an array of characters.

Parameters
cbuf:char[]

Array of characters to be written

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
writeback to summary
public void write(String str) throws IOException

Overrides java.io.Writer.write.

Doc from java.io.Writer.write.

Writes a string.

Parameters
str:String

String to be written

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
writeback to summary
public void write(String str, int off, int len) throws IOException

Overrides java.io.Writer.write.

Doc from java.io.Writer.write.

Writes a portion of a string.

Parameters
str:String

A String

off:int

Offset from which to start writing characters

len:int

Number of characters to write

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs