|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
java.io.PrintWriter
org.codehaus.groovy.grails.web.pages.GSPResponseWriter
public class GSPResponseWriter
NOTE: Based on work done by on the GSP standalone project (https://gsp.dev.java.net/) A buffered writer that won't commit the response until the buffer has reached the high water mark, or until flush() or close() is called.
| Field Summary |
|---|
| Fields inherited from class java.io.PrintWriter |
|---|
out |
| Fields inherited from class java.io.Writer |
|---|
lock |
| Method Summary | |
|---|---|
boolean |
checkError()
Flush the stream if it's not closed and check its error state. |
void |
close()
Close the stream. |
void |
flush()
Flush the stream. |
static GSPResponseWriter |
getInstance(ServletResponse response,
int max)
Static factory method to create the writer. |
static GSPResponseWriter |
getInstance(Writer target,
int max)
Static factory method to create the writer. |
GSPResponseWriter |
leftShift(Object value)
Provides Groovy << left shift operator, but intercepts call to make sure nulls are converted to "" strings |
void |
print(Object obj)
Print an object. |
void |
print(String s)
Print a string. |
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(String s)
Writes a string. |
void |
write(String s,
int off,
int len)
Write a portion of a string. |
| Methods inherited from class java.io.PrintWriter |
|---|
append, append, append, append, append, append, append, append, append, clearError, format, format, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean checkError()
checkError in class PrintWriterpublic void close()
close in interface Closeableclose in class PrintWritercheckError()public void flush()
flush in interface Flushableflush in class PrintWritercheckError()
public static GSPResponseWriter getInstance(ServletResponse response,
int max)
response - max -
public static GSPResponseWriter getInstance(Writer target,
int max)
target - The target writer to write toomax -
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 PrintWriterobj - 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 PrintWriters - The String to be printedpublic void write(String s)
null then the string
"" is printed.
write in class PrintWriters - The String to be printedpublic void write(int c)
write in class PrintWriterc - int specifying a character to be written.
public void write(char[] buf,
int off,
int len)
write in class PrintWriterbuf - Array of charactersoff - Offset from which to start writing characterslen - Number of characters to write
public void write(String s,
int off,
int len)
write in class PrintWriters - A Stringoff - Offset from which to start writing characterslen - Number of characters to write
public GSPResponseWriter leftShift(Object value)
throws IOException
value - The value
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||