|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectStringOutputSegment
OutputDocument.replace(Segment, CharSequence text)
method instead.
Implements an OutputSegment
whose content is a CharSequence
.
This class has been deprecated as of version 2.2 and the functionality replaced with the
OutputDocument.replace(Segment, CharSequence text)
method.
Field Summary |
Fields inherited from interface OutputSegment |
COMPARATOR |
Constructor Summary | |
StringOutputSegment(int begin,
int end,
java.lang.CharSequence text)
Deprecated. Constructs a new StringOutputSegment with the specified begin and end positions and the specified content. |
|
StringOutputSegment(Segment segment,
java.lang.CharSequence text)
Deprecated. Constructs a new StringOutputSegment with the same span as the specified Segment . |
Method Summary | |
int |
getBegin()
Deprecated. Returns the character position in the source text of the output document where this segment begins. |
java.lang.String |
getDebugInfo()
Deprecated. Returns a string representation of this object useful for debugging purposes. |
int |
getEnd()
Deprecated. Returns the character position in the source text of the output document where this segment ends. |
long |
getEstimatedMaximumOutputLength()
Deprecated. Returns the estimated maximum number of characters in the output, or -1 if no estimate is available. |
void |
output(java.io.Writer writer)
Deprecated. |
java.lang.String |
toString()
Deprecated. Returns the content of this output segment as a String . |
void |
writeTo(java.io.Writer writer)
Deprecated. Writes the content of this output segment to the specified Writer . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StringOutputSegment(int begin, int end, java.lang.CharSequence text)
StringOutputSegment
with the specified begin and end positions and the specified content.
Specifying a null
argument to the text
parameter is exactly equivalent to specifying an empty string,
and results in the segment being completely removed from the output document.
begin
- the position in the OutputDocument
where this output segment begins.end
- the position in the OutputDocument
where this output segment ends.text
- the textual content of the new output segment, or null
if no content.public StringOutputSegment(Segment segment, java.lang.CharSequence text)
Segment
.
Specifying a null
argument to the text
parameter is exactly equivalent to specifying an empty string,
and results in the segment being completely removed from the output document.
segment
- a segment defining the beginning and ending positions of the new output segment.text
- the textual content of the new output segment, or null
if no content.Method Detail |
public int getBegin()
OutputSegment
getBegin
in interface OutputSegment
public int getEnd()
OutputSegment
getEnd
in interface OutputSegment
public void writeTo(java.io.Writer writer) throws java.io.IOException
OutputSegment
Writer
.
writeTo
in interface OutputSegment
writer
- the destination java.io.Writer
for the output.
java.io.IOException
- if an I/O exception occurs.public long getEstimatedMaximumOutputLength()
CharStreamSource
-1
if no estimate is available.
The returned value should be used as a guide for efficiency purposes only, for example to set an initial StringBuffer
capacity.
There is no guarantee that the length of the output is indeed less than this value,
as classes implementing this method often use assumptions based on typical usage to calculate the estimate.
getEstimatedMaximumOutputLength
in interface CharStreamSource
-1
if no estimate is available.public java.lang.String toString()
OutputSegment
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 getDebugInfo()
method.
toString
in interface OutputSegment
public java.lang.String getDebugInfo()
OutputSegment
getDebugInfo
in interface OutputSegment
public void output(java.io.Writer writer) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |