Top Description Fields Constructors Methods
org.apache.catalina.connector

public Class CoyoteWriter

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

Coyote implementation of the servlet writer.
Author
Remy Maucherat

Field Summary

Modifier and TypeField and Description
protected boolean
private static final char[]
protected OutputBuffer
Inherited from java.io.PrintWriter:
out

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
checkError()

Overrides java.io.PrintWriter.checkError.

Flushes the stream if it's not closed and checks its error state.

pack-priv void
clear()

Clear facade.

protected Object
clone()

Overrides java.lang.Object.clone.

Prevent cloning the facade.

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 void
println()

Overrides java.io.PrintWriter.println.

Terminates the current line by writing the line separator string.

public void
println(boolean
the boolean value to be printed
b
)

Overrides java.io.PrintWriter.println.

Prints a boolean value and then terminates the line.

public void
println(char
the char value to be printed
c
)

Overrides java.io.PrintWriter.println.

Prints a character and then terminates the line.

public void
println(int
the int value to be printed
i
)

Overrides java.io.PrintWriter.println.

Prints an integer and then terminates the line.

public void
println(long
the long value to be printed
l
)

Overrides java.io.PrintWriter.println.

Prints a long integer and then terminates the line.

public void
println(float
the float value to be printed
f
)

Overrides java.io.PrintWriter.println.

Prints a floating-point number and then terminates the line.

public void
println(double
the double value to be printed
d
)

Overrides java.io.PrintWriter.println.

Prints a double-precision floating-point number and then terminates the line.

public void
println(char[]
the array of char values to be printed
c
)

Overrides java.io.PrintWriter.println.

Prints an array of characters and then terminates the line.

public void
println(String
the String value to be printed
s
)

Overrides java.io.PrintWriter.println.

Prints a String and then terminates the line.

public void
println(Object
The Object to be printed.
o
)

Overrides java.io.PrintWriter.println.

Prints an Object and then terminates the line.

pack-priv void
recycle()

Recycle.

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

Overrides java.io.PrintWriter.write.

Writes a single character.

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

Overrides java.io.PrintWriter.write.

Writes A Portion of an array of characters.

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

Overrides java.io.PrintWriter.write.

Writes an array of characters.

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

Overrides java.io.PrintWriter.write.

Writes a portion of a string.

public void
write(String
String to be written
s
)

Overrides java.io.PrintWriter.write.

Writes a string.

Inherited from java.io.PrintWriter:
appendappendappendclearErrorformatformatprintfprintfsetError

Field Detail

errorback to summary
protected boolean error
LINE_SEPback to summary
private static final char[] LINE_SEP
obback to summary
protected OutputBuffer ob

Constructor Detail

CoyoteWriterback to summary
public CoyoteWriter(OutputBuffer ob)

Method Detail

checkErrorback to summary
public boolean checkError()

Overrides java.io.PrintWriter.checkError.

Doc from java.io.PrintWriter.checkError.

Flushes the stream if it's not closed and checks its error state.

Returns:boolean

true if and only if this stream has encountered an IOException, or the setError method has been invoked

Annotations
@Override
clearback to summary
pack-priv void clear()

Clear facade.

cloneback to summary
protected Object clone() throws CloneNotSupportedException

Overrides java.lang.Object.clone.

Prevent cloning the facade.

Returns:Object

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
Exceptions
CloneNotSupportedException:

Doc from java.lang.Object.clone.

if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.

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
printlnback to summary
public void println()

Overrides java.io.PrintWriter.println.

Doc from java.io.PrintWriter.println.

Terminates the current line by writing the line separator string. The line separator is System#lineSeparator() and is not necessarily a single newline character ('\n').

Annotations
@Override
printlnback to summary
public void println(boolean b)

Overrides java.io.PrintWriter.println.

Doc from java.io.PrintWriter.println.

Prints a boolean value and then terminates the line. This method behaves as though it invokes print(boolean) and then println().

Parameters
b:boolean

the boolean value to be printed

Annotations
@Override
printlnback to summary
public void println(char c)

Overrides java.io.PrintWriter.println.

Doc from java.io.PrintWriter.println.

Prints a character and then terminates the line. This method behaves as though it invokes print(char) and then println().

Parameters
c:char

the char value to be printed

Annotations
@Override
printlnback to summary
public void println(int i)

Overrides java.io.PrintWriter.println.

Doc from java.io.PrintWriter.println.

Prints an integer and then terminates the line. This method behaves as though it invokes print(int) and then println().

Parameters
i:int

the int value to be printed

Annotations
@Override
printlnback to summary
public void println(long l)

Overrides java.io.PrintWriter.println.

Doc from java.io.PrintWriter.println.

Prints a long integer and then terminates the line. This method behaves as though it invokes print(long) and then println().

Parameters
l:long

the long value to be printed

Annotations
@Override
printlnback to summary
public void println(float f)

Overrides java.io.PrintWriter.println.

Doc from java.io.PrintWriter.println.

Prints a floating-point number and then terminates the line. This method behaves as though it invokes print(float) and then println().

Parameters
f:float

the float value to be printed

Annotations
@Override
printlnback to summary
public void println(double d)

Overrides java.io.PrintWriter.println.

Doc from java.io.PrintWriter.println.

Prints a double-precision floating-point number and then terminates the line. This method behaves as though it invokes print(double) and then println().

Parameters
d:double

the double value to be printed

Annotations
@Override
printlnback to summary
public void println(char[] c)

Overrides java.io.PrintWriter.println.

Doc from java.io.PrintWriter.println.

Prints an array of characters and then terminates the line. This method behaves as though it invokes print(char[]) and then println().

Parameters
c:char[]

the array of char values to be printed

Annotations
@Override
printlnback to summary
public void println(String s)

Overrides java.io.PrintWriter.println.

Doc from java.io.PrintWriter.println.

Prints a String and then terminates the line. This method behaves as though it invokes print(String) and then println().

Parameters
s:String

the String value to be printed

Annotations
@Override
printlnback to summary
public void println(Object o)

Overrides java.io.PrintWriter.println.

Doc from java.io.PrintWriter.println.

Prints an Object and then terminates the line. This method calls at first String.valueOf(x) to get the printed object's string value, then behaves as though it invokes print(String) and then println().

Parameters
o:Object

The Object to be printed.

Annotations
@Override
recycleback to summary
pack-priv void recycle()

Recycle.

writeback to summary
public void write(int c)

Overrides java.io.PrintWriter.write.

Doc from java.io.PrintWriter.write.

Writes a single character.

Parameters
c:int

int specifying a character to be written.

Annotations
@Override
writeback to summary
public void write(char[] buf, int off, int len)

Overrides java.io.PrintWriter.write.

Doc from java.io.PrintWriter.write.

Writes A Portion of an array of characters.

Parameters
buf:char[]

Array of characters

off:int

Offset from which to start writing characters

len:int

Number of characters to write

Annotations
@Override
writeback to summary
public void write(char[] buf)

Overrides java.io.PrintWriter.write.

Doc from java.io.PrintWriter.write.

Writes an array of characters. This method cannot be inherited from the Writer class because it must suppress I/O exceptions.

Parameters
buf:char[]

Array of characters to be written

Annotations
@Override
writeback to summary
public void write(String s, int off, int len)

Overrides java.io.PrintWriter.write.

Doc from java.io.PrintWriter.write.

Writes a portion of a string.

Parameters
s:String

A String

off:int

Offset from which to start writing characters

len:int

Number of characters to write

Annotations
@Override
writeback to summary
public void write(String s)

Overrides java.io.PrintWriter.write.

Doc from java.io.PrintWriter.write.

Writes a string. This method cannot be inherited from the Writer class because it must suppress I/O exceptions.

Parameters
s:String

String to be written

Annotations
@Override