|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.primix.tapestry.engine.NullResponseWriter
A IResponseWriter
that does absolutely nothing; this
is used during the rewind phase of the request cycle when output
is discarded anyway.
Constructor Summary | |
NullResponseWriter()
|
Method Summary | |
void |
attribute(java.lang.String name)
Simply prints the attribute name. |
void |
attribute(java.lang.String name,
int value)
Writes an integer attribute into the currently open tag. |
void |
attribute(java.lang.String name,
java.lang.String value)
Writes an attribute into the most recently opened tag. |
void |
begin(java.lang.String name)
Closes any existing tag then starts a new element. |
void |
beginEmpty(java.lang.String name)
Starts an element that will not later be matched with an end()
call. |
boolean |
checkError()
Always returns false. |
void |
close()
Closes this IResponseWriter . |
void |
closeTag()
Closes the most recently opened element by writing the '>' that ends it. |
void |
comment(java.lang.String value)
Writes an XML/HTML comment. |
void |
end()
Ends the element most recently started by begin(String) . |
void |
end(java.lang.String name)
Ends the most recently started element with the given name. |
void |
flush()
Forwards flush() to this
IResponseWriter 's PrintWriter . |
java.lang.String |
getContentType()
Returns the type of content generated by this response writer, as a MIME type. |
IResponseWriter |
getNestedWriter()
Returns this : since a NullResponseWriter doesn't actually
do anything, one is as good as another!. |
static IResponseWriter |
getSharedInstance()
|
void |
print(char value)
Prints a single character, or its equivalent entity. |
void |
print(char[] data,
int offset,
int length)
The primary print() method, used by most other
methods. |
void |
print(int value)
Prints an integer. |
void |
print(java.lang.String value)
Invokes print(char[], int, int) to print the string. |
void |
println()
Closes the open tag (if any), then prints a line seperator to the output stream. |
void |
printRaw(char[] buffer,
int offset,
int length)
Prints a portion of an output buffer to the stream. |
void |
printRaw(java.lang.String value)
Prints output to the stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NullResponseWriter()
Method Detail |
public static IResponseWriter getSharedInstance()
public void printRaw(char[] buffer, int offset, int length)
IResponseWriter
print()
.
Does nothing if buffer
is null.
Closes any open tag.
printRaw
in interface IResponseWriter
public void printRaw(java.lang.String value)
IResponseWriter
print()
.
Does nothing if value
is null.
Closes any open tag.
printRaw
in interface IResponseWriter
public void println()
IResponseWriter
println
in interface IResponseWriter
public void print(char[] data, int offset, int length)
IResponseWriter
print()
method, used by most other
methods.
Prints the character array, first closing any open tag. Problematic characters ('<', '>' and '&') are converted to appropriate entities.
Does nothing if data
is null.
Closes any open tag.
print
in interface IResponseWriter
public void print(char value)
IResponseWriter
Closes any open tag.
print
in interface IResponseWriter
public void print(int value)
IResponseWriter
Closes any open tag.
print
in interface IResponseWriter
public void print(java.lang.String value)
IResponseWriter
IResponseWriter.print(char[], int, int)
to print the string. Use
IResponseWriter.printRaw(String)
if the character data is known to be safe.
Does nothing if value
is null.
Closes any open tag.
print
in interface IResponseWriter
com.primix.tapestry.IResponseWriter
IResponseWriter.print(char[], int, int)
public IResponseWriter getNestedWriter()
this
: since a NullResponseWriter doesn't actually
do anything, one is as good as another!.getNestedWriter
in interface IResponseWriter
public java.lang.String getContentType()
IResponseWriter
getContentType
in interface IResponseWriter
public void flush()
IResponseWriter
flush()
to this
IResponseWriter
's PrintWriter
.flush
in interface IResponseWriter
public void end()
IResponseWriter
IResponseWriter.begin(String)
. * The name of the tag * is popped off of the
active element stack and used to form an HTML close tag.end
in interface IResponseWriter
public void end(java.lang.String name)
IResponseWriter
end
in interface IResponseWriter
public void comment(java.lang.String value)
IResponseWriter
<!--
and -->
, and
provides a blank line after the close of the comment.
Most characters are valid inside a comment, so no check
of the contents is made (much like IResponseWriter.printRaw(String)
.
comment
in interface IResponseWriter
public void closeTag()
IResponseWriter
attribute()
methods
may not be used until a new element is opened with IResponseWriter.begin(String)
or
or IResponseWriter.beginEmpty(String)
.closeTag
in interface IResponseWriter
public void close()
IResponseWriter
IResponseWriter
. Close tags are
written for any active elements. The PrintWriter
is then sent close()
. A nested writer will commit
its buffer to its containing writer.close
in interface IResponseWriter
public boolean checkError()
checkError
in interface IResponseWriter
public void beginEmpty(java.lang.String name)
IResponseWriter
end()
call. This is useful for elements that
do not need closing tags.beginEmpty
in interface IResponseWriter
public void begin(java.lang.String name)
IResponseWriter
begin
in interface IResponseWriter
public void attribute(java.lang.String name)
IResponseWriter
attribute
in interface IResponseWriter
com.primix.tapestry.IResponseWriter
java.lang.IllegalStateException
- if there is no open tag.public void attribute(java.lang.String name, int value)
IResponseWriter
attribute
in interface IResponseWriter
com.primix.tapestry.IResponseWriter
java.lang.IllegalStateException
- if there is no open tag.public void attribute(java.lang.String name, java.lang.String value)
IResponseWriter
IResponseWriter.begin(String)
and before any other kind of writing (which closes the tag).
The value may be null, in which case this method behaves the same as
IResponseWriter.attribute(String)
.
attribute
in interface IResponseWriter
com.primix.tapestry.IResponseWriter
java.lang.IllegalStateException
- if there is no open tag.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |