|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines the interface for an output segment, which is used in an OutputDocument
to
replace segments of the source document with other text.
All text in the OutputDocument
between the character positions defined by getBegin()
and getEnd()
is replaced by the content of this output segment.
If the begin and end character positions are the same, the content is simply
inserted at this position without replacing any text.
OutputDocument
Field Summary | |
static java.util.Comparator |
COMPARATOR
The comparator used to sort output segments in the OutputDocument . |
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 . |
Field Detail |
public static final java.util.Comparator COMPARATOR
OutputDocument
.
Method Detail |
public int getBegin()
OutputDocument
where this segment begins.
OutputDocument
where this segment begins.public int getEnd()
OutputDocument
where this segment ends.
OutputDocument
where this segment ends.public void output(java.io.Writer writer) throws java.io.IOException
Writer
.
writer
- the Writer
to which the output is to be sent.
java.io.IOException
- if an I/O exception occurs.public java.lang.String toString()
String
.
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.
String
.output(Writer)
public java.lang.String getDebugInfo()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |