|
2.17.2: 2011-06-17 | ||||||||
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 net.sf.basedb.clients.web.util.AjaxWriter
org.json.simple.*
package. See
http://code.google.com/p/json-simple/ for more information and
documentation.
@Deprecated public class AjaxWriter
Wraps a writer stream and provides methods for easier writing
of Ajax response. The writer can be configured with
setNullValue(String)
(default is an empty string)
and setRecordSeparator(String)
(default is an empty string).
Use ajaxPrintEntry(String, Object)
to print a singe line
with data and ajaxEndRecord()
to end the current record
and start a new one.
Field Summary | |
---|---|
private Pattern |
n
Deprecated. |
private String |
nullValue
Deprecated. |
private Pattern |
r
Deprecated. |
private String |
recordSeparator
Deprecated. |
Fields inherited from class java.io.PrintWriter |
---|
out |
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
AjaxWriter(Writer out)
Deprecated. Create a new ajax writer that is writing it's output to the given writer. |
Method Summary | |
---|---|
void |
ajaxEndRecord()
Deprecated. End the current record by printing the record separator string on a line by its own. |
String |
ajaxEscape(String in)
Deprecated. Escape new line and carrige return characters in the input to the literal string '\n' and '\r' in the output. |
void |
ajaxPrintEntry(String key,
Object value)
Deprecated. Print a record entry. |
String |
getNullValue()
Deprecated. The null value string is written to the output instead of null data values. |
String |
getRecordSeparator()
Deprecated. The record separator is written to the output on a single line between each record. |
void |
setNullValue(String nullValue)
Deprecated. Change the null value string. |
void |
setRecordSeparator(String recordSeparator)
Deprecated. Change the record separator string. |
Methods inherited from class java.io.PrintWriter |
---|
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String nullValue
private String recordSeparator
private Pattern r
private Pattern n
Constructor Detail |
---|
public AjaxWriter(Writer out)
out
- The writer to write the data toMethod Detail |
---|
public String getNullValue()
public void setNullValue(String nullValue)
nullValue
- The new null value stringpublic String getRecordSeparator()
public void setRecordSeparator(String recordSeparator)
recordSeparator
- The new record separatorpublic void ajaxPrintEntry(String key, Object value)
key
- The entry keyvalue
- The value, if null the configured null value
is used, otherwise the toString() method is calledpublic void ajaxEndRecord()
public String ajaxEscape(String in)
in
- The input string
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |