|
||||||||||
PREV CLASS NEXT CLASS | 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
PrintWriter implementation that doesn't have synchronization. null object references are ignored in print methods (nothing gets printed)
Field Summary | |
---|---|
protected boolean |
allowUnwrappingOut
|
protected Writer |
out
|
protected boolean |
trouble
|
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
GrailsPrintWriter(Writer out)
|
Method Summary | |
---|---|
PrintWriter |
append(char c)
|
PrintWriter |
append(CharSequence csq)
|
PrintWriter |
append(CharSequence csq,
int start,
int end)
|
GrailsPrintWriter |
append(Object obj)
|
void |
append(StreamCharBuffer otherBuffer)
|
boolean |
checkError()
Flush the stream if it's not closed and check its error state. |
protected Object |
clone()
|
void |
flush()
Flush the stream. |
Writer |
getFinalTarget()
|
Writer |
getOut()
|
protected void |
handleIOException(IOException e)
|
boolean |
isAllowUnwrappingOut()
|
boolean |
isFinalTargetHere()
|
boolean |
isUsed()
|
GrailsPrintWriter |
leftShift(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(Object value)
|
void |
print(boolean b)
delegate methods, not synchronized |
void |
print(char c)
|
void |
print(char[] s)
|
void |
print(double d)
|
void |
print(float f)
|
void |
print(int i)
|
void |
print(long l)
|
void |
print(Object obj)
Print an object. |
void |
print(StreamCharBuffer otherBuffer)
|
void |
print(String s)
Print a string. |
void |
print(groovy.lang.Writable writable)
|
void |
println()
|
void |
println(boolean b)
|
void |
println(char c)
|
void |
println(char[] c)
|
void |
println(double d)
|
void |
println(float f)
|
void |
println(int i)
|
void |
println(long l)
|
void |
println(Object o)
|
void |
println(StreamCharBuffer otherBuffer)
|
void |
println(String s)
|
boolean |
resetUsed()
|
void |
setFinalTargetHere(boolean finalTargetHere)
|
void |
setUsed(boolean newUsed)
|
void |
write(char[] buf)
|
void |
write(char[] buf,
int off,
int len)
Write a portion of an array of characters. |
void |
write(int c)
Write a single character. |
void |
write(StreamCharBuffer otherBuffer)
|
void |
write(String s)
Writes a string. |
void |
write(String s,
int off,
int len)
Write a portion of a string. |
void |
write(groovy.lang.Writable writable)
|
Methods inherited from class java.io.PrintWriter |
---|
clearError, close, format, format, printf, printf, setError |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean trouble
protected Writer out
protected boolean allowUnwrappingOut
Constructor Detail |
---|
public GrailsPrintWriter(Writer out)
Method Detail |
---|
public boolean isAllowUnwrappingOut()
public Writer getOut()
public boolean isFinalTargetHere()
public void setFinalTargetHere(boolean finalTargetHere)
public Writer getFinalTarget()
public GrailsPrintWriter leftShift(Object value) throws IOException
value
- The value
IOException
public GrailsPrintWriter plus(Object value) throws IOException
IOException
public boolean checkError()
checkError
in class PrintWriter
public void flush()
flush
in interface Flushable
flush
in class PrintWriter
checkError()
protected void handleIOException(IOException e)
public void print(Object obj)
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.
print
in class PrintWriter
obj
- The Object
to be printedObject.toString()
public void print(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.
print
in class PrintWriter
s
- The String
to be printedpublic void write(String s)
null
then the string
""
is printed.
write
in class PrintWriter
s
- The String
to be printedpublic void write(int c)
write
in class PrintWriter
c
- int specifying a character to be written.public void write(char[] buf, int off, int len)
write
in class PrintWriter
buf
- Array of charactersoff
- Offset from which to start writing characterslen
- Number of characters to writepublic void write(String s, int off, int len)
write
in class PrintWriter
s
- A Stringoff
- Offset from which to start writing characterslen
- Number of characters to writepublic void write(char[] buf)
write
in class PrintWriter
public void print(boolean b)
print
in class PrintWriter
public void print(char c)
print
in class PrintWriter
public void print(int i)
print
in class PrintWriter
public void print(long l)
print
in class PrintWriter
public void print(float f)
print
in class PrintWriter
public void print(double d)
print
in class PrintWriter
public void print(char[] s)
print
in class PrintWriter
public void println()
println
in class PrintWriter
public void println(boolean b)
println
in class PrintWriter
public void println(char c)
println
in class PrintWriter
public void println(int i)
println
in class PrintWriter
public void println(long l)
println
in class PrintWriter
public void println(float f)
println
in class PrintWriter
public void println(double d)
println
in class PrintWriter
public void println(char[] c)
println
in class PrintWriter
public void println(String s)
println
in class PrintWriter
public void println(Object o)
println
in class PrintWriter
public PrintWriter append(char c)
append
in interface Appendable
append
in class PrintWriter
public PrintWriter append(CharSequence csq, int start, int end)
append
in interface Appendable
append
in class PrintWriter
public PrintWriter append(CharSequence csq)
append
in interface Appendable
append
in class PrintWriter
public GrailsPrintWriter append(Object obj)
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public void write(StreamCharBuffer otherBuffer)
public void print(StreamCharBuffer otherBuffer)
public void append(StreamCharBuffer otherBuffer)
public void println(StreamCharBuffer otherBuffer)
public GrailsPrintWriter leftShift(StreamCharBuffer otherBuffer)
public void write(groovy.lang.Writable writable)
public void print(groovy.lang.Writable writable)
public GrailsPrintWriter leftShift(groovy.lang.Writable writable)
public boolean isUsed()
public void setUsed(boolean newUsed)
public boolean resetUsed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |