|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.Writer
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 static char[] |
CRLF
|
protected static org.apache.commons.logging.Log |
LOG
|
protected java.io.Writer |
out
|
protected java.io.Writer |
previousOut
|
protected java.io.Writer |
streamCharBufferTarget
|
protected boolean |
trouble
|
protected boolean |
usageFlag
|
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
GrailsPrintWriter(java.io.Writer out)
|
|
| Method Summary | |
|---|---|
GrailsPrintWriter |
append(char c)
|
GrailsPrintWriter |
append(java.lang.CharSequence csq)
|
GrailsPrintWriter |
append(java.lang.CharSequence csq,
int start,
int end)
|
GrailsPrintWriter |
append(java.lang.Object obj)
|
void |
append(StreamCharBuffer otherBuffer)
|
java.io.PrintWriter |
asPrintWriter()
|
java.lang.Object |
asType(java.lang.Class<?> clazz)
|
boolean |
checkError()
Flush the stream if it's not closed and check its error state. |
protected java.lang.Object |
clone()
|
void |
close()
|
protected java.io.Writer |
findStreamCharBufferTarget(boolean markUsed)
|
void |
flush()
Flush the stream. |
java.io.Writer |
getOut()
|
boolean |
isAllowUnwrappingOut()
|
boolean |
isUsed()
|
GrailsPrintWriter |
leftShift(org.codehaus.groovy.runtime.GStringImpl gstring)
|
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)
|
void |
markUsed()
|
GrailsPrintWriter |
plus(java.lang.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(org.codehaus.groovy.runtime.GStringImpl gstring)
|
void |
print(int i)
|
void |
print(long l)
|
void |
print(java.lang.Object obj)
Print an object. |
void |
print(StreamCharBuffer otherBuffer)
|
void |
print(java.lang.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(java.lang.Object o)
|
void |
println(StreamCharBuffer otherBuffer)
|
void |
println(java.lang.String s)
|
boolean |
resetUsed()
|
void |
setError()
|
void |
setOut(java.io.Writer newOut)
|
void |
setUsed(boolean newUsed)
|
java.io.Writer |
unwrap()
|
protected java.io.Writer |
unwrapWriter(java.io.Writer writer)
|
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(java.lang.String s)
Writes a string. |
void |
write(java.lang.String s,
int off,
int len)
Write a portion of a string. |
void |
write(groovy.lang.Writable writable)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log LOG
protected static final char[] CRLF
protected boolean trouble
protected java.io.Writer out
protected boolean allowUnwrappingOut
protected boolean usageFlag
protected java.io.Writer streamCharBufferTarget
protected java.io.Writer previousOut
| Constructor Detail |
|---|
public GrailsPrintWriter(java.io.Writer out)
| Method Detail |
|---|
public boolean isAllowUnwrappingOut()
isAllowUnwrappingOut in interface GrailsWrappedWriterpublic java.io.Writer unwrap()
unwrap in interface GrailsWrappedWriterpublic java.io.Writer getOut()
public void setOut(java.io.Writer newOut)
protected java.io.Writer unwrapWriter(java.io.Writer writer)
public GrailsPrintWriter leftShift(java.lang.Object value)
throws java.io.IOException
value - The value
java.io.IOException
public GrailsPrintWriter plus(java.lang.Object value)
throws java.io.IOException
java.io.IOExceptionpublic boolean checkError()
public void setError()
public void flush()
flush in interface java.io.Flushableflush in class java.io.WritercheckError()public void print(java.lang.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.
obj - The Object to be printedObject.toString()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 printedpublic void write(java.lang.String s)
null then the string
"" is printed.
write in class java.io.Writers - The String to be printedpublic void write(int c)
write in class java.io.Writerc - int specifying a character to be written.
public void write(char[] buf,
int off,
int len)
write in class java.io.Writerbuf - Array of charactersoff - Offset from which to start writing characterslen - Number of characters to write
public void write(java.lang.String s,
int off,
int len)
write in class java.io.Writers - A Stringoff - Offset from which to start writing characterslen - Number of characters to writepublic void write(char[] buf)
write in class java.io.Writerpublic void print(boolean b)
public void print(char c)
public void print(int i)
public void print(long l)
public void print(float f)
public void print(double d)
public void print(char[] s)
public void println()
public void println(boolean b)
public void println(char c)
public void println(int i)
public void println(long l)
public void println(float f)
public void println(double d)
public void println(char[] c)
public void println(java.lang.String s)
public void println(java.lang.Object o)
public GrailsPrintWriter append(char c)
append in interface java.lang.Appendableappend in class java.io.Writer
public GrailsPrintWriter append(java.lang.CharSequence csq,
int start,
int end)
append in interface java.lang.Appendableappend in class java.io.Writerpublic GrailsPrintWriter append(java.lang.CharSequence csq)
append in interface java.lang.Appendableappend in class java.io.Writerpublic GrailsPrintWriter append(java.lang.Object obj)
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic void write(StreamCharBuffer otherBuffer)
protected java.io.Writer findStreamCharBufferTarget(boolean markUsed)
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 void print(org.codehaus.groovy.runtime.GStringImpl gstring)
public GrailsPrintWriter leftShift(org.codehaus.groovy.runtime.GStringImpl gstring)
public boolean isUsed()
public void setUsed(boolean newUsed)
public boolean resetUsed()
public void close()
close in interface java.io.Closeableclose in class java.io.Writerpublic void markUsed()
markUsed in interface GrailsWrappedWriterpublic java.lang.Object asType(java.lang.Class<?> clazz)
public java.io.PrintWriter asPrintWriter()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||