Java Reference
In-Depth Information
A PPENDIX E: U SEFUL C LASSES , M ETHODS AND F UNCTIONS
The recipes in this topic present many useful classes, methods and functions. This ap-
pendix summarizes them. This appendix also presents a list of all of the topics recipes.
Reusable Functions and Methods
The following functions and methods were used as parts of recipes. These functions and
methods would be useful in other classes and programs. Table E.1 summarizes them.
Table E.1: Reusable Functions and Methods
Method/Function Introduced in Recipe Purpose
downloadPage
Recipe 3.1
Download a URL into a string.
extract
Recipe 3.2
Extract a string from a page bounded by two
substrings.
saveBinaryPage
Recipe 3.4
Save a downloaded page as binary.
downloadText
Recipe 3.5
Download a page as text.
extractNoCase
Recipe 4.2
Extract a string from a page bounded by two
case-insensitive substrings.
downloadText
Recipe 4.3
Download a text page and covert line end-
ings to match the Operating System.
downloadBinary
Recipe 4.3
Download a binary page.
addAuthHeader
Recipe 5.2
Add the HTTP Authentication header.
advance
Recipe 6.1
Advance the HTML parser to a specified tag.
getXMLNode
Recipe 10.2
Extract an XML node.
getXMLAttribute
Recipe 10.2
Extract an XML attribute.
Reusable Classes
Some examples in this topic were large enough for their own class or package. Table E.2
summarizes them.
 
Search WWH ::




Custom Search