|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--com.swfit.core.util.WebUtils
Simple and informal utilities for grabbing some contents of a HTML document somewhere on the web. Typical usage is as a starting point for personal notes, where the raw text is likely to be of some value. It does not consider HTML syntax, unicode, or any other feature a serious application will stress. This is the easy way out.
This code merely wraps around basic features of java, and uses the Quiotix HTML parser to extract the plain text. That package can be downloaded from:
http://www.quiotix.com/downloads/html-parser/
| Field Summary | |
static int |
BUF_SIZE
How large a file should we read ? |
static java.lang.String |
FTP
|
static java.lang.String |
HTTP
|
static java.lang.String |
HTTPS
|
static java.lang.String |
INVALID_HTML
Error messages |
static java.lang.String |
INVALID_URL
Error messages |
static java.lang.String |
MAILTO
|
static java.lang.String |
NO_ACCESS
Error messages |
static java.lang.String |
NO_DATA
Error messages |
static int |
NUM_BUF
How large a file should we read ? |
| Method Summary | |
static java.lang.String |
getContent(java.lang.String url_str)
A very. |
static boolean |
validMail(java.lang.String str)
Check for valid URL input |
static java.lang.String |
validURL(java.lang.String str)
Check for valid URL input |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String MAILTO
public static final java.lang.String HTTP
public static final java.lang.String HTTPS
public static final java.lang.String FTP
public static final int BUF_SIZE
public static final int NUM_BUF
public static final java.lang.String INVALID_URL
public static final java.lang.String NO_ACCESS
public static final java.lang.String INVALID_HTML
public static final java.lang.String NO_DATA
| Method Detail |
public static final boolean validMail(java.lang.String str)
public static final java.lang.String validURL(java.lang.String str)
public static final java.lang.String getContent(java.lang.String url_str)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||