|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectau.id.jericho.lib.html.BlankOutputSegment
Implements an IOutputSegment whose content is a string of spaces with the same length as the segment.
This class is used internally to implement the functionality available through the
Source.ignoreWhenParsing(int begin, int end) method.
It is included in the public API in the unlikely event it has other practical uses for the developer.
| Field Summary |
| Fields inherited from interface au.id.jericho.lib.html.IOutputSegment |
COMPARATOR |
| Constructor Summary | |
BlankOutputSegment(int begin,
int end)
Constructs a new BlankOutputSegment with the specified begin and end positions. |
|
BlankOutputSegment(Segment segment)
Constructs a new BlankOutputSegment with the same span as the specified Segment. |
|
| Method Summary | |
int |
getBegin()
Returns the character position in the OutputDocument where this segment begins. |
java.lang.String |
getDebugInfo()
Returns a string representation of this object useful for debugging purposes. |
int |
getEnd()
Returns the character position in the OutputDocument where this segment ends. |
void |
output(java.io.Writer writer)
Outputs the content of this output segment to the specified Writer. |
java.lang.String |
toString()
Returns the content of this output segment as a String. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BlankOutputSegment(int begin,
int end)
BlankOutputSegment with the specified begin and end positions.
begin - the position in the OutputDocument where this OutputSegment begins.end - the position in the OutputDocument where this OutputSegment ends.public BlankOutputSegment(Segment segment)
BlankOutputSegment with the same span as the specified Segment.
segment - a Segment defining the begin and end character positions of the new OutputSegment.| Method Detail |
public int getBegin()
IOutputSegmentOutputDocument where this segment begins.
getBegin in interface IOutputSegmentOutputDocument where this segment begins.public int getEnd()
IOutputSegmentOutputDocument where this segment ends.
getEnd in interface IOutputSegmentOutputDocument where this segment ends.
public void output(java.io.Writer writer)
throws java.io.IOException
IOutputSegmentWriter.
output in interface IOutputSegmentwriter - the Writer to which the output is to be sent.
java.io.IOException - if an I/O exception occurs.public java.lang.String toString()
IOutputSegmentString.
Note that before version 1.5 this returned a representation of this object useful for debugging purposes,
which can now be obtained via the getDebugInfo() method.
toString in interface IOutputSegmentpublic java.lang.String getDebugInfo()
IOutputSegment
getDebugInfo in interface IOutputSegment
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||