All Downloads are FREE. Search and download functionalities are using the official Maven repository.

doc.api.au.id.jericho.lib.html.BlankOutputSegment.html Maven / Gradle / Ivy

Go to download

Jericho HTML Parser is a simple but powerful java library allowing analysis and manipulation of parts of an HTML document, including some common server-side tags, while reproducing verbatim any unrecognised or invalid HTML. It also provides high-level HTML form manipulation functions.

There is a newer version: 2.3
Show newest version






BlankOutputSegment (Jericho HTML Parser 1.5-dev1)

















au.id.jericho.lib.html
Class BlankOutputSegment

java.lang.Object
  extended byau.id.jericho.lib.html.BlankOutputSegment
All Implemented Interfaces:
IOutputSegment

public final class BlankOutputSegment
extends java.lang.Object
implements IOutputSegment

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

BlankOutputSegment

public BlankOutputSegment(int begin,
                          int end)
Constructs a new BlankOutputSegment with the specified begin and end positions.

Parameters:
begin - the position in the OutputDocument where this OutputSegment begins.
end - the position in the OutputDocument where this OutputSegment ends.

BlankOutputSegment

public BlankOutputSegment(Segment segment)
Constructs a new BlankOutputSegment with the same span as the specified Segment.

Parameters:
segment - a Segment defining the begin and end character positions of the new OutputSegment.
Method Detail

getBegin

public int getBegin()
Description copied from interface: IOutputSegment
Returns the character position in the OutputDocument where this segment begins.

Specified by:
getBegin in interface IOutputSegment
Returns:
the character position in the OutputDocument where this segment begins.

getEnd

public int getEnd()
Description copied from interface: IOutputSegment
Returns the character position in the OutputDocument where this segment ends.

Specified by:
getEnd in interface IOutputSegment
Returns:
the character position in the OutputDocument where this segment ends.

output

public void output(java.io.Writer writer)
            throws java.io.IOException
Description copied from interface: IOutputSegment
Outputs the content of this output segment to the specified Writer.

Specified by:
output in interface IOutputSegment
Parameters:
writer - the Writer to which the output is to be sent.
Throws:
java.io.IOException - if an I/O exception occurs.

toString

public java.lang.String toString()
Description copied from interface: IOutputSegment
Returns the content of this output segment as a 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.

Specified by:
toString in interface IOutputSegment

getDebugInfo

public java.lang.String getDebugInfo()
Description copied from interface: IOutputSegment
Returns a string representation of this object useful for debugging purposes.

Specified by:
getDebugInfo in interface IOutputSegment
Returns:
a string representation of this object useful for debugging purposes.






© 2015 - 2024 Weber Informatics LLC | Privacy Policy