org.encog.bot.browse
Class LoadWebPage
- java.lang.Object
-
- org.encog.bot.browse.LoadWebPage
-
public class LoadWebPage extends java.lang.ObjectCalled to actually load a web page. This will read the HTML on a web page and generate the DocumentRange classes.
-
-
Constructor Summary
Constructors Constructor and Description LoadWebPage(java.net.URL theBase)Construct a web page loader with the specified base URL.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intfindEndTag(int index, Tag tag)Find the end tag that lines up to the beginning tag.WebPageload(java.io.InputStream is)Load a web page from the specified stream.WebPageload(java.lang.String str)Load the web page from a string that contains HTML.
-
-
-
Constructor Detail
-
LoadWebPage
public LoadWebPage(java.net.URL theBase)
Construct a web page loader with the specified base URL.- Parameters:
theBase- The base URL to use when loading.
-
-
Method Detail
-
findEndTag
public final int findEndTag(int index, Tag tag)Find the end tag that lines up to the beginning tag.- Parameters:
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.- Returns:
- The index that the ending tag was found at. Returns -1 if not found.
-
load
public final WebPage load(java.io.InputStream is)
Load a web page from the specified stream.- Parameters:
is- The input stream to load from.- Returns:
- The loaded web page.
-
load
public final WebPage load(java.lang.String str)
Load the web page from a string that contains HTML.- Parameters:
str- A string containing HTML.- Returns:
- The loaded WebPage.
-
-
DMelt 3.0 © DataMelt by jWork.ORG