|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.encog.bot.BotUtil
public final class BotUtil
Utility class for bots.
| Field Summary | |
|---|---|
static int |
BUFFER_SIZE
How much data to read at once. |
| Method Summary | |
|---|---|
static java.lang.String |
extract(java.lang.String str,
java.lang.String token1,
java.lang.String token2,
int index)
This method is very useful for grabbing information from a HTML page. |
static java.lang.String |
extractFromIndex(java.lang.String str,
java.lang.String token1,
java.lang.String token2,
int index,
int occurence)
This method is very useful for grabbing information from a HTML page. |
static int |
findOccurance(java.lang.String search,
java.lang.String searchFor,
int index)
Find the specified occurrence of one string in another string. |
static java.lang.String |
loadPage(java.io.InputStream is)
Load load from the specified input stream. |
static java.lang.String |
loadPage(java.net.URL url)
Load the specified web page into a string. |
static java.lang.String |
stripTags(java.lang.String str)
Strip any HTML or XML tags from the specified string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BUFFER_SIZE
| Method Detail |
|---|
public static java.lang.String extract(java.lang.String str,
java.lang.String token1,
java.lang.String token2,
int index)
str - The string to search.token1 - The text, or tag, that comes before the desired texttoken2 - The text, or tag, that comes after the desired textindex - Which occurrence of token1 to use, 1 for the first
public static java.lang.String extractFromIndex(java.lang.String str,
java.lang.String token1,
java.lang.String token2,
int index,
int occurence)
str - The string to search.token1 - The text, or tag, that comes before the desired texttoken2 - The text, or tag, that comes after the desired textindex - Index in the string to start searching from.occurence - What occurrence.
public static int findOccurance(java.lang.String search,
java.lang.String searchFor,
int index)
search - The string to search.searchFor - What we are searching for.index - The occurrence to find.
public static java.lang.String loadPage(java.io.InputStream is)
is - The input stream to load from.
public static java.lang.String loadPage(java.net.URL url)
url - The url to load.
public static java.lang.String stripTags(java.lang.String str)
str - The string to process.
|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||