|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.Writer java.io.PrintWriter org.codehaus.groovy.grails.web.util.GrailsPrintWriter
public class GrailsPrintWriter extends java.io.PrintWriter
PrintWriter implementation that doesn't have synchronization. null object references are ignored in print methods (nothing gets printed)
Field Summary | |
---|---|
protected static char[] |
CRLF
|
protected static Log |
LOG
|
protected boolean |
allowUnwrappingOut
|
protected java.io.Writer |
out
|
protected boolean |
trouble
|
protected boolean |
usageFlag
|
Constructor Summary | |
GrailsPrintWriter(java.io.Writer out)
|
Method Summary | |
---|---|
java.io.PrintWriter
|
append(char c)
|
java.io.PrintWriter
|
append(java.lang.CharSequence csq, int start, int end)
|
java.io.PrintWriter
|
append(java.lang.CharSequence csq)
|
GrailsPrintWriter
|
append(java.lang.Object obj)
|
void
|
append(StreamCharBuffer otherBuffer)
|
boolean
|
checkError()
Flush the stream if it's not closed and check its error state. |
protected java.lang.Object
|
clone()
|
protected java.io.Writer
|
findStreamCharBufferTarget(boolean markUsed)
|
void
|
flush()
Flush the stream. |
java.io.Writer
|
getFinalTarget()
|
java.io.Writer
|
getOut()
|
protected void
|
handleIOException(java.io.IOException e)
|
boolean
|
isAllowUnwrappingOut()
|
boolean
|
isFinalTargetHere()
|
boolean
|
isUsed()
|
GrailsPrintWriter
|
leftShift(java.lang.Object value)
Provides Groovy << left shift operator, but intercepts call to make sure nulls are converted to "" strings |
GrailsPrintWriter
|
leftShift(StreamCharBuffer otherBuffer)
|
GrailsPrintWriter
|
leftShift(groovy.lang.Writable writable)
|
GrailsPrintWriter
|
plus(java.lang.Object value)
|
void
|
print(java.lang.Object obj)
Print an object. |
void
|
print(java.lang.String s)
Print a string. |
void
|
print(boolean b)
delegate methods, not synchronized * |
void
|
print(char c)
|
void
|
print(int i)
|
void
|
print(long l)
|
void
|
print(float f)
|
void
|
print(double d)
|
void
|
print(char[] s)
|
void
|
print(StreamCharBuffer otherBuffer)
|
void
|
print(groovy.lang.Writable writable)
|
void
|
println()
|
void
|
println(boolean b)
|
void
|
println(char c)
|
void
|
println(int i)
|
void
|
println(long l)
|
void
|
println(float f)
|
void
|
println(double d)
|
void
|
println(char[] c)
|
void
|
println(java.lang.String s)
|
void
|
println(java.lang.Object o)
|
void
|
println(StreamCharBuffer otherBuffer)
|
boolean
|
resetUsed()
|
void
|
setFinalTargetHere(boolean finalTargetHere)
|
void
|
setUsed(boolean newUsed)
|
void
|
write(java.lang.String s)
Writes a string. |
void
|
write(int c)
Write a single character. |
void
|
write(char[] buf, int off, int len)
Write a portion of an array of characters. |
void
|
write(java.lang.String s, int off, int len)
Write a portion of a string. |
void
|
write(char[] buf)
|
void
|
write(StreamCharBuffer otherBuffer)
|
void
|
write(groovy.lang.Writable writable)
|
Methods inherited from class java.io.PrintWriter | |
---|---|
java.io.PrintWriter#println(char), java.io.PrintWriter#println(), java.io.PrintWriter#println(boolean), java.io.PrintWriter#println(java.lang.Object), java.io.PrintWriter#println(java.lang.String), java.io.PrintWriter#println([C), java.io.PrintWriter#println(double), java.io.PrintWriter#println(float), java.io.PrintWriter#println(long), java.io.PrintWriter#println(int), java.io.PrintWriter#append(java.lang.CharSequence), java.io.PrintWriter#append(java.lang.CharSequence), java.io.PrintWriter#append(java.lang.CharSequence, int, int), java.io.PrintWriter#append(char), java.io.PrintWriter#append(char), java.io.PrintWriter#append(java.lang.CharSequence, int, int), java.io.PrintWriter#append(java.lang.CharSequence), java.io.PrintWriter#append(char), java.io.PrintWriter#append(java.lang.CharSequence, int, int), java.io.PrintWriter#format(java.util.Locale, java.lang.String, [Ljava.lang.Object;), java.io.PrintWriter#format(java.lang.String, [Ljava.lang.Object;), java.io.PrintWriter#write([C), java.io.PrintWriter#write([C, int, int), java.io.PrintWriter#write(int), java.io.PrintWriter#write(java.lang.String, int, int), java.io.PrintWriter#write(java.lang.String), java.io.PrintWriter#print(java.lang.String), java.io.PrintWriter#print(java.lang.Object), java.io.PrintWriter#print(boolean), java.io.PrintWriter#print(char), java.io.PrintWriter#print(int), java.io.PrintWriter#print(long), java.io.PrintWriter#print(float), java.io.PrintWriter#print(double), java.io.PrintWriter#print([C), java.io.PrintWriter#flush(), java.io.PrintWriter#close(), java.io.PrintWriter#checkError(), java.io.PrintWriter#printf(java.lang.String, [Ljava.lang.Object;), java.io.PrintWriter#printf(java.util.Locale, java.lang.String, [Ljava.lang.Object;), java.io.PrintWriter#wait(), java.io.PrintWriter#wait(long), java.io.PrintWriter#wait(long, int), java.io.PrintWriter#equals(java.lang.Object), java.io.PrintWriter#toString(), java.io.PrintWriter#hashCode(), java.io.PrintWriter#getClass(), java.io.PrintWriter#notify(), java.io.PrintWriter#notifyAll() |
Methods inherited from class java.io.Writer | |
---|---|
java.io.Writer#append(java.lang.CharSequence), java.io.Writer#append(java.lang.CharSequence), java.io.Writer#append(java.lang.CharSequence, int, int), java.io.Writer#append(char), java.io.Writer#append(char), java.io.Writer#append(java.lang.CharSequence, int, int), java.io.Writer#write([C, int, int), java.io.Writer#write(int), java.io.Writer#write([C), java.io.Writer#write(java.lang.String), java.io.Writer#write(java.lang.String, int, int), java.io.Writer#flush(), java.io.Writer#close(), java.io.Writer#wait(), java.io.Writer#wait(long), java.io.Writer#wait(long, int), java.io.Writer#equals(java.lang.Object), java.io.Writer#toString(), java.io.Writer#hashCode(), java.io.Writer#getClass(), java.io.Writer#notify(), java.io.Writer#notifyAll() |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
protected static final char[] CRLF
protected static final Log LOG
protected boolean allowUnwrappingOut
protected java.io.Writer out
protected boolean trouble
protected boolean usageFlag
Constructor Detail |
---|
public GrailsPrintWriter(java.io.Writer out)
Method Detail |
---|
@Override public java.io.PrintWriter append(char c)
@Override public java.io.PrintWriter append(java.lang.CharSequence csq, int start, int end)
@Override public java.io.PrintWriter append(java.lang.CharSequence csq)
public GrailsPrintWriter append(java.lang.Object obj)
public void append(StreamCharBuffer otherBuffer)
@Override public boolean checkError()
@Override protected java.lang.Object clone()
protected java.io.Writer findStreamCharBufferTarget(boolean markUsed)
@Override public void flush()
public java.io.Writer getFinalTarget()
public java.io.Writer getOut()
protected void handleIOException(java.io.IOException e)
public boolean isAllowUnwrappingOut()
public boolean isFinalTargetHere()
public boolean isUsed()
public GrailsPrintWriter leftShift(java.lang.Object value)
value
- The value
public GrailsPrintWriter leftShift(StreamCharBuffer otherBuffer)
public GrailsPrintWriter leftShift(groovy.lang.Writable writable)
public GrailsPrintWriter plus(java.lang.Object value)
@Override public void print(java.lang.Object obj)
java.lang.String#valueOf(Object)
method is translated into bytes
according to the platform's default character encoding, and these bytes
are written in exactly the manner of the write(int)
method.
obj
- The Object
to be printed
@Override public void print(java.lang.String s)
null
then the string
""
is printed. Otherwise, the string's characters are
converted into bytes according to the platform's default character
encoding, and these bytes are written in exactly the manner of the
write(int)
method.
s
- The String
to be printed
@Override public void print(boolean b)
@Override public void print(char c)
@Override public void print(int i)
@Override public void print(long l)
@Override public void print(float f)
@Override public void print(double d)
@Override public void print(char[] s)
public void print(StreamCharBuffer otherBuffer)
public void print(groovy.lang.Writable writable)
@Override public void println()
@Override public void println(boolean b)
@Override public void println(char c)
@Override public void println(int i)
@Override public void println(long l)
@Override public void println(float f)
@Override public void println(double d)
@Override public void println(char[] c)
@Override public void println(java.lang.String s)
@Override public void println(java.lang.Object o)
public void println(StreamCharBuffer otherBuffer)
public boolean resetUsed()
public void setFinalTargetHere(boolean finalTargetHere)
public void setUsed(boolean newUsed)
@Override public void write(java.lang.String s)
null
then the string
""
is printed.
s
- The String
to be printed
@Override public void write(int c)
c
- int specifying a character to be written.
@Override public void write(char[] buf, int off, int len)
buf
- Array of charactersoff
- Offset from which to start writing characterslen
- Number of characters to write
@Override public void write(java.lang.String s, int off, int len)
s
- A Stringoff
- Offset from which to start writing characterslen
- Number of characters to write
@Override public void write(char[] buf)
public void write(StreamCharBuffer otherBuffer)
public void write(groovy.lang.Writable writable)
Groovy Documentation