| au.id.jericho.lib.html.OutputSegment
All known Subclasses: au.id.jericho.lib.html.AttributesOutputSegment, au.id.jericho.lib.html.RemoveOutputSegment, au.id.jericho.lib.html.CharOutputSegment, au.id.jericho.lib.html.BlankOutputSegment, au.id.jericho.lib.html.StringOutputSegment,
Method Summary | |
public int | getBegin() Returns the character position in the
where this segment begins. | public String | getDebugInfo() Returns a string representation of this object useful for debugging purposes. | public int | getEnd() Returns the character position in the
where this segment ends. | public String | toString() Returns the content of this output segment as a String . | public void | writeTo(Writer writer) Writes the content of this output segment to the specified Writer . |
COMPARATOR | final public static Comparator COMPARATOR(Code) | | The comparator used to sort output segments in the
OutputDocument before output.
The following rules are applied in order compare two output segments:
- The output segment that
earlier in the document comes first.
- If both output segments begin at the same position, the one that has zero length comes first.
If neither or both have zero length then neither is guaranteed to come before the other.
Note: this comparator has a natural ordering that may be inconsistent with the equals
method of classes implementing this interface.
This means that the comparator may treat two output segments as equal where calling the
equals(Object) method with the same two output segments returns false .
|
getBegin | public int getBegin()(Code) | | Returns the character position in the
where this segment begins.
the character position in the where this segment begins. |
getDebugInfo | public String getDebugInfo()(Code) | | Returns a string representation of this object useful for debugging purposes.
a string representation of this object useful for debugging purposes. |
getEnd | public int getEnd()(Code) | | Returns the character position in the
where this segment ends.
the character position in the where this segment ends. |
toString | public String toString()(Code) | | Returns the content of this output segment as a String .
Note that before version 2.0 this returned a representation of this object useful for debugging purposes,
which can now be obtained via the
OutputSegment.getDebugInfo() getDebugInfo() method.
the content of this output segment as a String , guaranteed not null . See Also: OutputSegment.writeTo(Writer) |
writeTo | public void writeTo(Writer writer) throws IOException(Code) | | Writes the content of this output segment to the specified Writer .
Parameters: writer - the destination java.io.Writer for the output. throws: IOException - if an I/O exception occurs. |
|
|