input
stringlengths
10
828
output
stringlengths
5
107
public string to string return new string text
returns the content of the parse text as a code string code
public string get end tag name final string start tag name return start tag name
returns the end tag
public string generate html final string start tag name return start delimiter prefix get end tag name start tag name get closing delimiter
generates the html text of an
public renderer set max line length final int max line length this max line length max line length return this
sets the column at which lines are to be wrapped
public list get form controls return form controls
returns a list of all the
public int get max line length return max line length
returns the column at which lines are to be wrapped
public boolean is empty element tag return is syntactical empty element tag htmlelements is closing slash ignored name
indicates whether this start tag is an a target blank href http www
public string get debug info final string buffer sb new string buffer for final iterator i iterator i has next sb append i next return sb to string
returns a string representation of this object useful for debugging purposes
public renderer set include hyperlink urls final boolean include hyperlink urls this include hyperlink urls include hyperlink urls return this
sets whether hyperlink urls are included in the output
public void configure ftpclient config config this configuration config
implementation of the
public boolean get include hyperlink urls return include hyperlink urls
indicates whether hyperlink urls are included in the output
public renderer set decorate font styles final boolean decorate font styles this decorate font styles decorate font styles return this
sets whether decoration characters are to be included around the content of some
public boolean get decorate font styles return decorate font styles
indicates whether decoration characters are to be included around the content of some
public renderer set convert non breaking spaces boolean convert non breaking spaces this convert non breaking spaces convert non breaking spaces return this
sets whether non breaking space
public segment get tag content return new segment source begin 1 name length end start tag type get closing delimiter length
returns the segment between the end of the tags
public renderer set block indent size final int block indent size this block indent size block indent size return this
sets the size of the indent to be used for anything other than
public int get block indent size return block indent size
returns the size of the indent to be used for anything other than
public string to string return append to new string buffer 20 to string
returns a string representation of this character position
public boolean is end tag forbidden if get start tag type start tag type normal return get start tag type get corresponding end tag type null if htmlelements get end tag forbidden element names contains name return true if htmlelements get element names contains name return false return is syntactical empty element tag
indicates whether a matching end tag is forbidden
public renderer set list indent size final int list indent size this list indent size list indent size return this
sets the size of the indent to be used for
public boolean is end tag required if get start tag type start tag type normal return get start tag type get corresponding end tag type null if htmlelements get end tag required element names contains name return true if htmlelements get element names contains name return false return is syntactical empty element tag
indicates whether a matching end tag is required
public int get list indent size return list indent size
returns the size of the indent to be used for
public renderer set list bullets final char list bullets if list bullets null list bullets length 0 throw new illegal argument exception list bullets argument must be an array of at least one character this list bullets list bullets return this
sets the bullet characters to use for list items inside
public string tidy return tidy false
returns an xml representation of this start tag
public renderer set table cell separator final string table cell separator this table cell separator table cell separator return this
sets the string that is to separate table cells
public void write to final writer writer throws ioexception attributes append html writer map
writes the contents of the
public string get table cell separator return table cell separator
returns the string that is to separate table cells
public int get code point return code point
returns the a target blank href http www
public int get count return attribute list size
returns the number of attributes
public char get char return char code point
returns the character represented by this character reference
public iterator iterator return list iterator
returns an iterator over the
public boolean is terminated return source char at end 1
indicates whether this character reference is terminated by a semicolon code code
public list iterator list iterator final int index return attribute list list iterator index
returns a list iterator of the
public string get decimal character reference string return get decimal character reference string code point
returns the a href numeric character reference
public string get hexadecimal character reference string return get hexadecimal character reference string code point
returns the a href numeric character reference
public string get debug info final string buffer sb new string buffer sb append attributes append super get debug info append if is empty sb append empty else sb append config new line for final iterator i list iterator 0 i has next attribute attribute attribute i next sb append append attribute get debug info return sb to string
returns a string representation of this object useful for debugging purposes
public string tidy return to string
returns an xml representation of this end tag
public void set error enabled final boolean error enabled this error enabled error enabled
sets whether logging is enabled at the error level
public void set warn enabled final boolean warn enabled this warn enabled warn enabled
sets whether logging is enabled at the warn level
public element get parent element if parent element element not cached source get child elements if parent element element not cached parent element null return parent element
returns the parent of this element in the document element hierarchy
public void set info enabled final boolean info enabled this info enabled info enabled
sets whether logging is enabled at the info level
public void set debug enabled final boolean debug enabled this debug enabled debug enabled
sets whether logging is enabled at the debug level
protected void log final string level final string message try writer write basic log formatter format level message name writer flush catch ioexception ex throw new runtime exception ex
logs the specified message at the specified level
public int get depth if depth 1 get parent element if depth 1 depth 0 return depth
returns the nesting depth of this element in the document element hierarchy
public segment get content if content null content new segment source start tag end get content end return content
returns the segment representing the a target blank href http www
public start tag get start tag return start tag
returns the start tag of the element
public end tag get end tag return end tag
returns the end tag of the element
public object get final int index final list iterator li list iterator index try return li next catch no such element exception ex throw new index out of bounds exception index index
returns the item at the specified position in this list
public collection get form controls return form controls
returns a collection of all the constituent
public boolean is empty return get count 0
indicates whether this list is empty
public boolean contains final object o return index of o 0
indicates whether this list contains the specified object
public boolean is empty return start tag end get content end
indicates whether this element has zero length
public form control get form control return form control form controls iterator next
returns the first
public boolean contains all final collection collection for final iterator i collection iterator i has next if contains i next return false return true
indicates whether this list contains all of the items in the specified collection
public boolean allows multiple values return allows multiple values
indicates whether the field allows multiple values
public boolean is empty element tag return start tag is empty element tag
indicates whether this element is an a target blank href http www
public int get user value count return user value count
returns the number of constituent a href form control
public attributes get attributes return get start tag get attributes
returns the attributes specified in this elements start tag
public collection get predefined values return predefined values null predefined values collections empty set
returns a collection of the
public string get debug info final string buffer sb new string buffer sb append field append name append user value count append user value count append allows multiple values append allows multiple values if predefined values null for final iterator i predefined values iterator i has next sb append config new line append predefined value sb append i next for final iterator i form controls iterator i has next sb append config new line append form control sb append form control i next get debug info sb append config new line append config new line return sb to string
returns a string representation of this object useful for debugging purposes
public string get character reference string return get character reference string name
returns the correct encoded form of this character entity reference
public boolean has predefined value return has predefined value
indicates whether any a target blank href http www
public string get debug info final string buffer sb new string buffer sb append append character reference string sb name sb append append unicode text sb code point sb append append super get debug info return sb to string
returns a string representation of this object useful for debugging purposes
public string to string return form control type id
returns a string representation of this object useful for debugging purposes
public int hash code return begin end
returns a hash code value for the segment
public string to string return source string substring begin end to string
returns the source text of this segment as a code string code
public renderer get renderer return new renderer this
performs a simple rendering of the html markup in this segment into text
public string get encoding specification info if encoding uninitialised get document specified encoding return encoding specification info
returns a concise description of how the
public text extractor get text extractor return new text extractor this
extracts the textual content from the html markup of this segment
public int get unterminated character entity reference max code point final boolean inside attribute value return get unterminated character reference settings inside attribute value character entity reference max code point
returns the maximum unicode code point of an a href character reference
public iterator get node iterator return new node iterator this
returns an iterator over every tag and text segment contained within this segment
public void set unterminated character entity reference max code point final boolean inside attribute value final int max code point get unterminated character reference settings inside attribute value character entity reference max code point max code point
sets the maximum unicode code point of an a href character reference
public list find all tags return find all tags null
returns a list of all
public int get unterminated decimal character reference max code point final boolean inside attribute value return get unterminated character reference settings inside attribute value decimal character reference max code point
returns the maximum unicode code point of an a href character reference
public list find all tags final tag type tag type tag tag check enclosure tag find next tag source begin tag type if tag null return collections empty list final array list list new array list do list add tag tag check enclosure tag type null tag find next tag tag find next tag source tag begin 1 tag type tag find next may be more efficient than tag find next tag source tag begin 1 null due to caching while tag null return list
returns a list of all
public void set unterminated decimal character reference max code point final boolean inside attribute value final int max code point get unterminated character reference settings inside attribute value decimal character reference max code point max code point
sets the maximum unicode code point of an a href character reference
public list find all start tags return find all start tags null
returns a list of all
public string get new line if new line uninitialised return new line for int i 0 i end i char ch string char at i if ch n return new line last new line lf if ch r return new line last new line i end string char at i n crlf cr return new line null
returns the a target blank href http en
public int get unterminated hexadecimal character reference max code point final boolean inside attribute value return get unterminated character reference settings inside attribute value hexadecimal character reference max code point
returns the maximum unicode code point of an a href character reference
public list find all start tags string name if name null name name to lower case final boolean is xmltag name tag is xmlname name start tag start tag start tag check enclosure start tag find next source begin name start tag type normal is xmltag name if start tag null return collections empty list final array list list new array list do list add start tag start tag start tag check enclosure start tag find next source start tag begin 1 name start tag type normal is xmltag name while start tag null return list
returns a list of all
public int get row final int pos return get row column vector pos get row
returns the row number of the specified character position in the source document
public list find all start tags final string attribute name final string value final boolean value case sensitive start tag start tag start tag check enclosure source find next start tag begin attribute name value value case sensitive if start tag null return collections empty list final array list list new array list do list add start tag start tag start tag check enclosure source find next start tag start tag begin 1 attribute name value value case sensitive while start tag null return list
returns a list of all
public void set unterminated hexadecimal character reference max code point final boolean inside attribute value final int max code point get unterminated character reference settings inside attribute value hexadecimal character reference max code point max code point
sets the maximum unicode code point of an a href character reference
public int get column final int pos return get row column vector pos get column
returns the column number of the specified character position in the source document
public list find all elements return find all elements string null
returns a list of all
public string get debug info return form field name case insensitive form field name case insensitive config new line maximum codepoints in unterminated character references config new line inside attribute values unterminated character reference settings inside attribute value config new line outside attribute values unterminated character reference settings outside attribute value
returns a string representation of this object useful for debugging purposes
public list find all elements string name if name null name name to lower case final list start tags find all start tags name if start tags is empty return collections empty list final array list elements new array list start tags size for final iterator i start tags iterator i has next final start tag start tag start tag i next final element element start tag get element if element end end break elements add element return elements
returns a list of all
public list find all elements final start tag type start tag type final list start tags find all tags start tag type if start tags is empty return collections empty list final array list elements new array list start tags size for final iterator i start tags iterator i has next final start tag start tag start tag i next final element element start tag get element if element end end break elements add element return elements
returns a list of all
public list find all elements final string attribute name final string value final boolean value case sensitive final list start tags find all start tags attribute name value value case sensitive if start tags is empty return collections empty list final array list elements new array list start tags size for final iterator i start tags iterator i has next final start tag start tag start tag i next final element element start tag get element if element end end break elements add element return elements
returns a list of all
public string get character reference string return hex get hexadecimal character reference string code point get decimal character reference string code point
returns the correct encoded form of this numeric character reference
public list find all character references character reference character reference find next character reference begin if character reference null return collections empty list final array list list new array list do list add character reference character reference find next character reference character reference end while character reference null return list
returns a list of all
public map get mailcap list string mime type map search result null map wildcard result null first try the literal search result map type hash get mime type ok now try the wildcard int separator mime type index of string subtype mime type substring separator 1 if subtype equals string type mime type substring 0 separator 1 wildcard result map type hash get type if wildcard result null damn we have to merge if search result null search result merge results search result wildcard result else search result wildcard result return search result
get the map of mailcap entries based on the mime type
public list find form controls return form control find all this
returns a list of the
public map get mailcap fallback list string mime type map search result null map wildcard result null first try the literal search result map fallback hash get mime type ok now try the wildcard int separator mime type index of string subtype mime type substring separator 1 if subtype equals string type mime type substring 0 separator 1 wildcard result map fallback hash get type if wildcard result null damn we have to merge if search result null search result merge results search result wildcard result else search result wildcard result return search result
get the map of fallback mailcap entries based on the mime type
private map merge results map first map second iterator verb enum second key set iterator map cloned hash new hash map first iterate through the verbs in the second map while verb enum has next string verb string verb enum next list cmd vector list cloned hash get verb if cmd vector null cloned hash put verb second get verb else merge the two list old v list second get verb cmd vector new array list cmd vector cmd vector add all old v cloned hash put verb cmd vector return cloned hash
merge the first hash into the second
public void append to mailcap string mail cap if log support is loggable log support log append to mailcap mail cap try parse new string reader mail cap catch ioexception ex can t happen
append to mailcap append to this mailcap db use the mailcap
public void set is autoquoting boolean value is autoquoting value
set whether auto quoting is on or off
public mime type entry get mime type entry string file ext return mime type entry type hash get object file ext
get the mime type entry based on the file extension
public string get mimetype string string file ext mime type entry entry this get mime type entry file ext if entry null return entry get mimetype else return null
get the mime type string corresponding to the file extension
public void append to registry string mime types try parse new buffered reader new string reader mime types catch ioexception ex can t happen
appends string of entries to the types registry must be valid