org.encog.bot.browse
public class LoadWebPage extends Object
Constructor and Description |
---|
LoadWebPage(URL theBase)
Construct a web page loader with the specified base URL.
|
Modifier and Type | Method and Description |
---|---|
int |
findEndTag(int index,
Tag tag)
Find the end tag that lines up to the beginning tag.
|
WebPage |
load(InputStream is)
Load a web page from the specified stream.
|
WebPage |
load(String str)
Load the web page from a string that contains HTML.
|
protected void |
loadContents()
Using the data units, which should have already been loaded by this time,
load the contents of the web page.
|
protected void |
loadDataUnits(InputStream is)
Load the data units.
|
protected void |
loadForm(int index,
Tag tag)
Called by loadContents to load a form on the page.
|
protected void |
loadInput(int index,
Tag tag)
Called by loadContents to load an input tag on the form.
|
protected void |
loadLink(int index,
Tag tag)
Called by loadContents to load a link on the page.
|
protected void |
loadTitle(int index,
Tag tag)
Called by loadContents to load the title of the page.
|
public LoadWebPage(URL theBase)
theBase
- The base URL to use when loading.public final int findEndTag(int index, Tag tag)
index
- The index to start the search on. This specifies the starting
data unit.tag
- The beginning tag that we are seeking the end tag for.public final WebPage load(InputStream is)
is
- The input stream to load from.public final WebPage load(String str)
str
- A string containing HTML.protected final void loadContents()
protected final void loadDataUnits(InputStream is)
is
- The input stream that the data units are loaded from.protected final void loadForm(int index, Tag tag)
index
- The index to begin loading at.tag
- The beginning tag.protected final void loadInput(int index, Tag tag)
index
- The index to begin loading at.tag
- The beginning tag.protected final void loadLink(int index, Tag tag)
index
- The index to begin loading at.tag
- The beginning tag.protected final void loadTitle(int index, Tag tag)
index
- The index to begin loading at.tag
- The beginning tag.Copyright © 2014. All Rights Reserved.