Top Fields Constructors Methods
io.undertow.servlet.spec

public final Class ServletPrintWriterDelegate

extends PrintWriter
Class Inheritance
Imports
java.io.OutputStream, .PrintWriter, java.lang.reflect.Field, java.security.AccessController, .PrivilegedAction, java.util.Locale, sun.misc.Unsafe

Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private ServletPrintWriter
private static final Unsafe
Inherited from java.io.PrintWriter:
out

Constructor Summary

AccessConstructor and Description
private

Method Summary

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

Overrides java.io.PrintWriter.append.

Implements java.lang.Appendable.append.

Appends the specified character sequence to this writer.

public PrintWriter
append(final 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
,
final int
The index of the first character in the subsequence
start
,
final int
The index of the character following the last character in the subsequence
end
)

Overrides java.io.PrintWriter.append.

Implements java.lang.Appendable.append.

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

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

Overrides java.io.PrintWriter.append.

Implements java.lang.Appendable.append.

Appends the specified character to this writer.

public boolean
checkError()

Overrides java.io.PrintWriter.checkError.

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

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 PrintWriter
format(final String
A format string as described in Format string syntax.
format
,
final Object...
Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by The Java Virtual Machine Specification. The behaviour on a null argument depends on the conversion.
args
)

Overrides java.io.PrintWriter.format.

Writes a formatted string to this writer using the specified format string and arguments.

public PrintWriter
format(final Locale
The locale to apply during formatting. If l is null then no localization is applied.
l
,
final String
A format string as described in Format string syntax.
format
,
final Object...
Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by The Java Virtual Machine Specification. The behaviour on a null argument depends on the conversion.
args
)

Overrides java.io.PrintWriter.format.

Writes a formatted string to this writer using the specified format string and arguments.

private static Unsafe
private static Unsafe
public static ServletPrintWriterDelegate
newInstance(final ServletPrintWriter servletPrintWriter)

public PrintWriter
printf(final String
A format string as described in Format string syntax.
format
,
final Object...
Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by The Java Virtual Machine Specification. The behaviour on a null argument depends on the conversion.
args
)

Overrides java.io.PrintWriter.printf.

A convenience method to write a formatted string to this writer using the specified format string and arguments.

public PrintWriter
printf(final Locale
The locale to apply during formatting. If l is null then no localization is applied.
l
,
final String
A format string as described in Format string syntax.
format
,
final Object...
Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by The Java Virtual Machine Specification. The behaviour on a null argument depends on the conversion.
args
)

Overrides java.io.PrintWriter.printf.

A convenience method to write a formatted string to this writer using the specified format string and arguments.

public void
println()

Overrides java.io.PrintWriter.println.

Terminates the current line by writing the line separator string.

public void
println(final boolean
the boolean value to be printed
x
)

Overrides java.io.PrintWriter.println.

Prints a boolean value and then terminates the line.

public void
println(final char
the char value to be printed
x
)

Overrides java.io.PrintWriter.println.

Prints a character and then terminates the line.

public void
println(final int
the int value to be printed
x
)

Overrides java.io.PrintWriter.println.

Prints an integer and then terminates the line.

public void
println(final long
the long value to be printed
x
)

Overrides java.io.PrintWriter.println.

Prints a long integer and then terminates the line.

public void
println(final float
the float value to be printed
x
)

Overrides java.io.PrintWriter.println.

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

public void
println(final double
the double value to be printed
x
)

Overrides java.io.PrintWriter.println.

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

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

Overrides java.io.PrintWriter.println.

Prints an array of characters and then terminates the line.

public void
println(final String
the String value to be printed
x
)

Overrides java.io.PrintWriter.println.

Prints a String and then terminates the line.

public void
println(final Object
The Object to be printed.
x
)

Overrides java.io.PrintWriter.println.

Prints an Object and then terminates the line.

public void
setServletPrintWriter(final ServletPrintWriter servletPrintWriter)

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

Overrides java.io.PrintWriter.write.

Writes a single character.

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

Overrides java.io.PrintWriter.write.

Writes A Portion of an array of characters.

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

Overrides java.io.PrintWriter.write.

Writes an array of characters.

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

Overrides java.io.PrintWriter.write.

Writes a portion of a string.

public void
write(final String
String to be written
s
)

Overrides java.io.PrintWriter.write.

Writes a string.

Inherited from java.io.PrintWriter:
clearErrorsetError

Field Detail

servletPrintWriterback to summary
private ServletPrintWriter servletPrintWriter
UNSAFEback to summary
private static final Unsafe UNSAFE

Constructor Detail

ServletPrintWriterDelegateback to summary
private ServletPrintWriterDelegate()

Method Detail

appendback to summary
public PrintWriter append(final CharSequence csq)

Overrides java.io.PrintWriter.append.

Implements java.lang.Appendable.append.

Doc from java.io.PrintWriter.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:PrintWriter

This writer

Annotations
@Override
appendback to summary
public PrintWriter append(final CharSequence csq, final int start, final int end)

Overrides java.io.PrintWriter.append.

Implements java.lang.Appendable.append.

Doc from java.io.PrintWriter.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:PrintWriter

This writer

Annotations
@Override
appendback to summary
public PrintWriter append(final char c)

Overrides java.io.PrintWriter.append.

Implements java.lang.Appendable.append.

Doc from java.io.PrintWriter.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:PrintWriter

This writer

Annotations
@Override
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
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
formatback to summary
public PrintWriter format(final String format, final Object... args)

Overrides java.io.PrintWriter.format.

Doc from java.io.PrintWriter.format.

Writes a formatted string to this writer using the specified format string and arguments. If automatic flushing is enabled, calls to this method will flush the output buffer.

The locale always used is the one returned by Locale.getDefault(), regardless of any previous invocations of other formatting methods on this object.

Parameters
format:String

A format string as described in Format string syntax.

args:Object[]

Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by The Java Virtual Machine Specification. The behaviour on a null argument depends on the conversion.

Returns:PrintWriter

This writer

Annotations
@Override
formatback to summary
public PrintWriter format(final Locale l, final String format, final Object... args)

Overrides java.io.PrintWriter.format.

Doc from java.io.PrintWriter.format.

Writes a formatted string to this writer using the specified format string and arguments. If automatic flushing is enabled, calls to this method will flush the output buffer.

Parameters
l:Locale

The locale to apply during formatting. If l is null then no localization is applied.

format:String

A format string as described in Format string syntax.

args:Object[]

Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by The Java Virtual Machine Specification. The behaviour on a null argument depends on the conversion.

Returns:PrintWriter

This writer

Annotations
@Override
getUnsafeback to summary
private static Unsafe getUnsafe()
getUnsafe0back to summary
private static Unsafe getUnsafe0()
newInstanceback to summary
public static ServletPrintWriterDelegate newInstance(final ServletPrintWriter servletPrintWriter)
printfback to summary
public PrintWriter printf(final String format, final Object... args)

Overrides java.io.PrintWriter.printf.

Doc from java.io.PrintWriter.printf.

A convenience method to write a formatted string to this writer using the specified format string and arguments. If automatic flushing is enabled, calls to this method will flush the output buffer.

An invocation of this method of the form out.printf(format, args) behaves in exactly the same way as the invocation

out.format(format, args)
out.format(format, args)
Parameters
format:String

A format string as described in Format string syntax.

args:Object[]

Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by The Java Virtual Machine Specification. The behaviour on a null argument depends on the conversion.

Returns:PrintWriter

This writer

Annotations
@Override
printfback to summary
public PrintWriter printf(final Locale l, final String format, final Object... args)

Overrides java.io.PrintWriter.printf.

Doc from java.io.PrintWriter.printf.

A convenience method to write a formatted string to this writer using the specified format string and arguments. If automatic flushing is enabled, calls to this method will flush the output buffer.

An invocation of this method of the form out.printf(l, format, args) behaves in exactly the same way as the invocation

out.format(l, format, args)
out.format(l, format, args)
Parameters
l:Locale

The locale to apply during formatting. If l is null then no localization is applied.

format:String

A format string as described in Format string syntax.

args:Object[]

Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by The Java Virtual Machine Specification. The behaviour on a null argument depends on the conversion.

Returns:PrintWriter

This writer

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(final boolean x)

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
x:boolean

the boolean value to be printed

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

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
x:char

the char value to be printed

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

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
x:int

the int value to be printed

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

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
x:long

the long value to be printed

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

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
x:float

the float value to be printed

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

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
x:double

the double value to be printed

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

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
x:char[]

the array of char values to be printed

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

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
x:String

the String value to be printed

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

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
x:Object

The Object to be printed.

Annotations
@Override
setServletPrintWriterback to summary
public void setServletPrintWriter(final ServletPrintWriter servletPrintWriter)
writeback to summary
public void write(final 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(final char[] buf, final int off, final 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(final 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(final String s, final int off, final 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(final 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