|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.util.HTMLTools
public class HTMLTools
Various HTML and HTTP utilities
Nested Class Summary | |
---|---|
static class |
HTMLTools.HttpBufferedInputStream
A BufferedInputStream class that retains a handle to the HttpURLConnection instance |
static class |
HTMLTools.HttpIOException
HttpIOException class Wrapper for IOException when due to an HttpURLConnection error. |
static class |
HTMLTools.TagBlock
Custom TagBlock class |
static class |
HTMLTools.TagWrap
Custom tag wrapper class |
Field Summary | |
---|---|
static java.lang.String |
AMP
|
static java.lang.String |
BR
|
static java.lang.String |
CHARSET_UTF8
|
static java.lang.String |
CONTENT_FORM_MULTIPART
|
static java.lang.String |
CONTENT_FORM_URLENCODED
|
static java.lang.String |
CONTENT_TYPE_BINARY
|
static java.lang.String |
CONTENT_TYPE_BMP
|
static java.lang.String |
CONTENT_TYPE_CSV
|
static java.lang.String |
CONTENT_TYPE_CSV_OLD
|
static java.lang.String |
CONTENT_TYPE_DOC
|
static java.lang.String |
CONTENT_TYPE_ENTITY_CSV
|
static java.lang.String |
CONTENT_TYPE_GIF
|
static java.lang.String |
CONTENT_TYPE_HTML
|
static java.lang.String |
CONTENT_TYPE_JAD
|
static java.lang.String |
CONTENT_TYPE_JAR
|
static java.lang.String |
CONTENT_TYPE_JPEG
|
static java.lang.String |
CONTENT_TYPE_JSON
|
static java.lang.String |
CONTENT_TYPE_KML
|
static java.lang.String |
CONTENT_TYPE_KML_XML
|
static java.lang.String |
CONTENT_TYPE_KMZ
|
static java.lang.String |
CONTENT_TYPE_MOV
|
static java.lang.String |
CONTENT_TYPE_MPEG
|
static java.lang.String |
CONTENT_TYPE_OCTET
|
static java.lang.String |
CONTENT_TYPE_PDF
|
static java.lang.String |
CONTENT_TYPE_PLAIN
|
static java.lang.String |
CONTENT_TYPE_PNG
|
static java.lang.String |
CONTENT_TYPE_PS
|
static java.lang.String |
CONTENT_TYPE_RTPROP
|
static java.lang.String |
CONTENT_TYPE_TEXT
|
static java.lang.String |
CONTENT_TYPE_TIFF
|
static java.lang.String |
CONTENT_TYPE_XLS
|
static java.lang.String |
CONTENT_TYPE_XLSX
|
static java.lang.String |
CONTENT_TYPE_XML
|
static java.lang.String |
CONTENT_TYPE_ZIP
|
static java.lang.String |
DEFAULT_USER_AGENT
|
static java.lang.String |
GT
|
static java.lang.String |
HEADER_ACCESS_CONTROL_ALLOW_ORIGIN
|
static java.lang.String |
HEADER_CONTENT_DISPOSITION
|
static java.lang.String |
HEADER_CONTENT_LENGTH
|
static java.lang.String |
HEADER_CONTENT_TYPE
|
static java.lang.String |
HEADER_COOKIE
|
static java.lang.String |
HEADER_HOST
|
static java.lang.String |
HEADER_REFERER
|
static java.lang.String |
HEADER_SET_COOKIE
|
static java.lang.String |
HEADER_SOAPACTION
|
static java.lang.String |
HEADER_USER_AGENT
|
static java.lang.String |
HR
|
static java.lang.String |
HTML
|
static java.lang.String |
LT
|
static byte[] |
MAGIC_BMP
|
static byte[] |
MAGIC_GIF_87a
|
static byte[] |
MAGIC_GIF_89a
|
static byte[] |
MAGIC_JAVA_CLASS
|
static byte[] |
MAGIC_JPEG
|
static byte[] |
MAGIC_JPEG_C
|
static byte[] |
MAGIC_PNG
|
static byte[] |
MAGIC_TIFF_II
|
static byte[] |
MAGIC_TIFF_MM
|
static java.lang.String |
PROP_HTMLTools_MIME_
|
static java.lang.String |
PROP_User_Agent
|
static java.lang.String |
QUOTE
|
static java.lang.String |
REQUEST_GET
|
static java.lang.String |
REQUEST_POST
|
static java.lang.String |
SP
|
static HTMLTools.TagBlock |
TAG_BLOCKQUOTE
|
static HTMLTools.TagBlock |
TAG_BLUE
|
static HTMLTools.TagBlock |
TAG_BLUEBOLD
|
static HTMLTools.TagBlock |
TAG_BOLD
|
static HTMLTools.TagBlock |
TAG_BULLETLIST
|
static HTMLTools.TagBlock |
TAG_CENTER
|
static HTMLTools.TagBlock |
TAG_GREEN
|
static HTMLTools.TagBlock |
TAG_GREENBOLD
|
static HTMLTools.TagBlock |
TAG_H1
|
static HTMLTools.TagBlock |
TAG_H2
|
static HTMLTools.TagBlock |
TAG_H3
|
static HTMLTools.TagBlock |
TAG_HTML
|
static HTMLTools.TagBlock |
TAG_ITALIC
|
static HTMLTools.TagBlock |
TAG_LISTITEM
|
static HTMLTools.TagBlock |
TAG_MONOCENTER
|
static HTMLTools.TagBlock |
TAG_MONORIGHT
|
static HTMLTools.TagBlock |
TAG_MONOSPACE
|
static HTMLTools.TagBlock |
TAG_NUMBERLIST
|
static HTMLTools.TagBlock |
TAG_RED
|
static HTMLTools.TagBlock |
TAG_REDBOLD
|
static HTMLTools.TagBlock |
TAG_RIGHT
|
static HTMLTools.TagBlock |
TAG_SMALLCENTER
|
static HTMLTools.TagBlock |
TAG_SMALLFONT
|
Constructor Summary | |
---|---|
HTMLTools()
|
Method Summary | |
---|---|
static java.lang.String |
_font()
Closes a 'span' tag used to specify 'font' style. |
static java.lang.String |
autoRefresh(int delay,
java.lang.String url)
Returns a 'meta' tag with a 'refresh' option |
static java.lang.String |
color(java.awt.Color color)
Encode the specified color into a String value |
static java.lang.String |
createIFrameTemplate(int w,
int h,
java.lang.String srcURL)
Creates an IField/ILayer section. |
static java.lang.StringBuffer |
createIFrameTemplate(int w,
int h,
java.lang.String srcURL,
java.lang.StringBuffer sb)
Creates an IField/ILayer section. |
static java.lang.String |
createIFrameTemplate(java.lang.String srcURL)
Creates an IField/ILayer section. |
static java.lang.StringBuffer |
createIFrameTemplate(java.lang.String srcURL,
java.lang.StringBuffer sb)
Creates an IField/ILayer section. |
static java.lang.String |
createLink(java.lang.String ref,
boolean newWindow,
java.lang.Object text)
Creates/Returns a String representing a link to a URL with the specified text description and attributes. |
static java.lang.String |
createLink(java.lang.String ref,
boolean newWindow,
java.lang.Object text,
boolean filterText)
Creates/Returns a String representing a link to a URL with the specified text description and attributes. |
static java.lang.String |
createLink(java.lang.String ref,
java.lang.Object text)
Creates/Returns a String representing a link to a URL with the specified text description and attributes. |
static java.lang.String |
decodeParameter(java.lang.String text)
Decode URL encoded hex values from the specified String |
static java.lang.String |
encodeParameter(java.lang.Object text)
Encode specific characters in the specified text object |
static java.lang.String |
endJavaScript()
Returns a String representing an end-of-JavaScript tag |
static java.lang.String |
font(java.lang.String family,
java.lang.String style,
java.lang.String variant,
java.lang.String weight,
int ptsize)
Returns a 'span' wrapper with the specified 'font' specification |
static java.lang.String |
getContentMultipartBoundary(java.lang.String ct)
Gets the "boundary=" value |
static java.lang.String |
getExtensionFromMimeType(java.lang.String mime,
java.lang.String dft)
Returns an extension name for the specified MIME type |
static java.lang.String |
getHttpUserAgent()
Gets the HTTP "User-Agent" value to use for HTTP requests. |
static PixelDimension |
getImageDimension(byte[] D)
Return the Image Dimension based on the data Magic Number |
static java.lang.String |
getMimeType(java.lang.String name,
java.lang.String dftType)
Returns the requested mime type |
static java.lang.String |
getMimeTypeCharset(java.lang.String type)
Appends the default "charset" to mime type |
static java.lang.String |
getMimeTypeCharset(java.lang.String type,
java.lang.String charSet)
Appends the specified "charset" to mime type |
static java.lang.String |
getMimeTypeFromData(byte[] data)
Return the MIME type based on the data Magic Number |
static java.lang.String |
getMimeTypeFromData(byte[] data,
java.lang.String dft)
Return the MIME type based on the data Magic Number |
static java.lang.String |
getMimeTypeFromExtension(java.lang.String extn)
Returns the MIME type for the specified extension |
static java.lang.String |
getMimeTypeFromExtension(java.lang.String extn,
java.lang.String dft)
Returns the MIME type for the specified extension |
static HTMLTools.HttpBufferedInputStream |
inputStream_GET(java.lang.String pageURLStr,
int timeoutMS)
Returns an InputStream for reading the contents of the specified URL |
static HTMLTools.HttpBufferedInputStream |
inputStream_GET(java.net.URL pageURL,
int timeoutMS)
Returns an InputStream for reading the contents of the specified URL |
static boolean |
isContentMultipartForm(java.lang.String ct)
Returns true if the content type is a multipart form |
static void |
main(java.lang.String[] argv)
Main entry point for testing/debugging |
static java.lang.String |
MIME_BINARY()
Returns "binary" MIME type |
static java.lang.String |
MIME_BMP()
Returns "bmp" MIME type |
static java.lang.String |
MIME_CSV()
Returns "csv" MIME type |
static java.lang.String |
MIME_GIF()
Returns "gif" MIME type |
static java.lang.String |
MIME_HTML()
Returns "html" MIME type |
static java.lang.String |
MIME_JPEG()
Returns "jpeg" MIME type |
static java.lang.String |
MIME_JSON()
Returns "json" MIME type |
static java.lang.String |
MIME_KML()
Returns "kml" MIME type |
static java.lang.String |
MIME_MOV()
Returns "mov" MIME type |
static java.lang.String |
MIME_MPEG()
Returns "mpeg" MIME type |
static java.lang.String |
MIME_PLAIN()
Returns "plain" MIME type |
static java.lang.String |
MIME_PNG()
Returns "png" MIME type |
static java.lang.String |
MIME_TIFF()
Returns "tiff" MIME type |
static java.lang.String |
MIME_XLS()
Returns "xls" MIME type |
static java.lang.String |
MIME_XLSX()
Returns "xlsx" MIME type |
static java.lang.String |
MIME_XML()
Returns "xml" MIME type |
static java.lang.String |
MIME_XML(java.lang.String charSet)
Returns "xml" MIME type, with added character set |
static java.lang.String |
MIME_ZIP()
Returns "zip" MIME type |
static byte[] |
readPage_GET_LogError(java.lang.String pageURLStr,
int timeoutMS)
Sends a GET to the specified URL, then reads and returns the response. |
static byte[] |
readPage_GET_LogError(java.net.URL pageURL,
int timeoutMS)
Sends a GET to the specified URL, then reads and returns the response. |
static byte[] |
readPage_GET(java.lang.String pageURLStr,
int timeoutMS)
Sends a GET to the specified URL, then reads and returns the response |
static byte[] |
readPage_GET(java.net.URL pageURL,
int timeoutMS)
Sends a GET to the specified URL, then reads and returns the response |
static byte[] |
readPage_POST(java.lang.String pageURLStr,
java.util.Properties headerProps,
byte[] postData,
int timeoutMS)
Sends a POST to the specified URL, then reads and returns the response |
static byte[] |
readPage_POST(java.lang.String pageURLStr,
java.lang.String contentType,
byte[] postData,
int timeoutMS)
Sends a POST to the specified URL, then reads and returns the response |
static byte[] |
readPage_POST(java.net.URL pageURL,
java.util.Properties headerProps,
byte[] postData,
int timeoutMS)
Sends a POST to the specified URL, then reads and returns the response |
static byte[] |
readPage_POST(java.net.URL pageURL,
java.util.Properties headerProps,
byte[] postData,
int timeoutMS,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> returnFields)
Sends a POST to the specified URL, then reads and returns the response |
static byte[] |
readPage_POST(java.net.URL pageURL,
java.lang.String contentType,
byte[] postData,
int timeoutMS)
Sends a POST to the specified URL, then reads and returns the response |
static void |
setDebugDumpHeaders(boolean dump)
Debug: specify that header fields should be logged during "readPage_POST"/"readPage_GET" |
static void |
setHttpUserAgent(java.lang.String userAgent)
Sets the HTTP "User-Agent" value to use for HTTP requests. |
static java.lang.String |
startJavaScript()
Returns a String representing a start-of-JavaScript tag |
static HTMLTools.TagBlock |
TAG_COLOR(java.awt.Color c)
Returns a TagBlock 'font' wrapper with the specified color |
static HTMLTools.TagBlock |
TAG_COLOR(java.lang.String cs)
Returns a TagBlock 'font' wrapper with the specified color String |
static HTMLTools.TagBlock |
TAG_LINK(java.lang.String url)
Returns a TagBlock 'a href=' wrapper with the specified url |
static HTMLTools.TagBlock |
TAG_LINK(java.lang.String url,
boolean newWindow)
Returns a TagBlock 'a href=' wrapper with the specified url |
static HTMLTools.TagBlock |
TAG_TOOLTIP(java.lang.String tip)
Returns a TagBlock 'span' wrapper with the specified title/tooltip |
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 PROP_HTMLTools_MIME_
public static final java.lang.String SP
public static final java.lang.String LT
public static final java.lang.String GT
public static final java.lang.String AMP
public static final java.lang.String QUOTE
public static final java.lang.String BR
public static final java.lang.String HR
public static final java.lang.String HTML
public static final java.lang.String REQUEST_GET
public static final java.lang.String REQUEST_POST
public static final byte[] MAGIC_GIF_87a
public static final byte[] MAGIC_GIF_89a
public static final byte[] MAGIC_JPEG
public static final byte[] MAGIC_JPEG_C
public static final byte[] MAGIC_PNG
public static final byte[] MAGIC_TIFF_II
public static final byte[] MAGIC_TIFF_MM
public static final byte[] MAGIC_BMP
public static final byte[] MAGIC_JAVA_CLASS
public static final java.lang.String CHARSET_UTF8
public static final java.lang.String HEADER_CONTENT_TYPE
public static final java.lang.String HEADER_CONTENT_DISPOSITION
public static final java.lang.String HEADER_CONTENT_LENGTH
public static final java.lang.String HEADER_USER_AGENT
public static final java.lang.String HEADER_REFERER
public static final java.lang.String HEADER_HOST
public static final java.lang.String HEADER_SOAPACTION
public static final java.lang.String HEADER_ACCESS_CONTROL_ALLOW_ORIGIN
public static final java.lang.String HEADER_SET_COOKIE
public static final java.lang.String HEADER_COOKIE
public static final java.lang.String PROP_User_Agent
public static final java.lang.String DEFAULT_USER_AGENT
public static final java.lang.String CONTENT_FORM_MULTIPART
public static final java.lang.String CONTENT_FORM_URLENCODED
public static final java.lang.String CONTENT_TYPE_PLAIN
public static final java.lang.String CONTENT_TYPE_TEXT
public static final java.lang.String CONTENT_TYPE_XML
public static final java.lang.String CONTENT_TYPE_HTML
public static final java.lang.String CONTENT_TYPE_GIF
public static final java.lang.String CONTENT_TYPE_JPEG
public static final java.lang.String CONTENT_TYPE_PNG
public static final java.lang.String CONTENT_TYPE_TIFF
public static final java.lang.String CONTENT_TYPE_BMP
public static final java.lang.String CONTENT_TYPE_OCTET
public static final java.lang.String CONTENT_TYPE_BINARY
public static final java.lang.String CONTENT_TYPE_DOC
public static final java.lang.String CONTENT_TYPE_XLS
public static final java.lang.String CONTENT_TYPE_XLSX
public static final java.lang.String CONTENT_TYPE_CSV_OLD
public static final java.lang.String CONTENT_TYPE_CSV
public static final java.lang.String CONTENT_TYPE_PDF
public static final java.lang.String CONTENT_TYPE_PS
public static final java.lang.String CONTENT_TYPE_ZIP
public static final java.lang.String CONTENT_TYPE_JAD
public static final java.lang.String CONTENT_TYPE_JAR
public static final java.lang.String CONTENT_TYPE_KML_XML
public static final java.lang.String CONTENT_TYPE_KML
public static final java.lang.String CONTENT_TYPE_KMZ
public static final java.lang.String CONTENT_TYPE_JSON
public static final java.lang.String CONTENT_TYPE_MOV
public static final java.lang.String CONTENT_TYPE_MPEG
public static final java.lang.String CONTENT_TYPE_ENTITY_CSV
public static final java.lang.String CONTENT_TYPE_RTPROP
public static final HTMLTools.TagBlock TAG_HTML
public static final HTMLTools.TagBlock TAG_H1
public static final HTMLTools.TagBlock TAG_H2
public static final HTMLTools.TagBlock TAG_H3
public static final HTMLTools.TagBlock TAG_CENTER
public static final HTMLTools.TagBlock TAG_BLOCKQUOTE
public static final HTMLTools.TagBlock TAG_RIGHT
public static final HTMLTools.TagBlock TAG_BOLD
public static final HTMLTools.TagBlock TAG_ITALIC
public static final HTMLTools.TagBlock TAG_MONOSPACE
public static final HTMLTools.TagBlock TAG_MONORIGHT
public static final HTMLTools.TagBlock TAG_MONOCENTER
public static final HTMLTools.TagBlock TAG_RED
public static final HTMLTools.TagBlock TAG_REDBOLD
public static final HTMLTools.TagBlock TAG_GREEN
public static final HTMLTools.TagBlock TAG_GREENBOLD
public static final HTMLTools.TagBlock TAG_BLUE
public static final HTMLTools.TagBlock TAG_BLUEBOLD
public static final HTMLTools.TagBlock TAG_SMALLFONT
public static final HTMLTools.TagBlock TAG_SMALLCENTER
public static final HTMLTools.TagBlock TAG_NUMBERLIST
public static final HTMLTools.TagBlock TAG_BULLETLIST
public static final HTMLTools.TagBlock TAG_LISTITEM
Constructor Detail |
---|
public HTMLTools()
Method Detail |
---|
public static void setDebugDumpHeaders(boolean dump)
public static void setHttpUserAgent(java.lang.String userAgent)
userAgent
- The user-agentpublic static java.lang.String getHttpUserAgent()
public static boolean isContentMultipartForm(java.lang.String ct)
ct
- The content type
public static java.lang.String getContentMultipartBoundary(java.lang.String ct)
ct
- The content type
public static java.lang.String MIME_ZIP()
public static java.lang.String MIME_PLAIN()
public static java.lang.String MIME_HTML()
public static java.lang.String MIME_XML()
public static java.lang.String MIME_XML(java.lang.String charSet)
public static java.lang.String MIME_CSV()
public static java.lang.String MIME_XLS()
public static java.lang.String MIME_XLSX()
public static java.lang.String MIME_KML()
public static java.lang.String MIME_JSON()
public static java.lang.String MIME_BINARY()
public static java.lang.String MIME_PNG()
public static java.lang.String MIME_GIF()
public static java.lang.String MIME_JPEG()
public static java.lang.String MIME_TIFF()
public static java.lang.String MIME_BMP()
public static java.lang.String MIME_MOV()
public static java.lang.String MIME_MPEG()
public static java.lang.String getMimeType(java.lang.String name, java.lang.String dftType)
name
- The name of the MIME type property keydftType
- The default MIME type to return
public static java.lang.String getMimeTypeCharset(java.lang.String type)
type
- The Mime type
public static java.lang.String getMimeTypeCharset(java.lang.String type, java.lang.String charSet)
type
- The Mime typecharSet
- The 'charset'
public static java.lang.String getMimeTypeFromExtension(java.lang.String extn)
extn
- The extension
public static java.lang.String getMimeTypeFromExtension(java.lang.String extn, java.lang.String dft)
extn
- The extensiondft
- The default MIME type to return if the extension is not recognized
public static java.lang.String getMimeTypeFromData(byte[] data)
data
- The data buffer to test for specific Magin-Numbers
public static java.lang.String getMimeTypeFromData(byte[] data, java.lang.String dft)
data
- The data buffer to test for specific Magin-Numbersdft
- The default MIME type to return if the data is not recognized
public static java.lang.String getExtensionFromMimeType(java.lang.String mime, java.lang.String dft)
mime
- The MIME typedft
- The default extension if the MIME type is not found
public static PixelDimension getImageDimension(byte[] D)
D
- The image data buffer
public static HTMLTools.TagBlock TAG_COLOR(java.awt.Color c)
c
- The font color
public static HTMLTools.TagBlock TAG_COLOR(java.lang.String cs)
cs
- The font color String
public static HTMLTools.TagBlock TAG_TOOLTIP(java.lang.String tip)
tip
- The title/tooltip
public static HTMLTools.TagBlock TAG_LINK(java.lang.String url)
url
- The URL
public static HTMLTools.TagBlock TAG_LINK(java.lang.String url, boolean newWindow)
url
- The URLnewWindow
- True to specify "target=_blank"
public static java.lang.String encodeParameter(java.lang.Object text)
text
- The text Object
public static java.lang.String decodeParameter(java.lang.String text)
text
- The encoded text
public static java.lang.String color(java.awt.Color color)
color
- The Color object
public static java.lang.String createLink(java.lang.String ref, java.lang.Object text)
ref
- The referenced URL link ("target='_blank'" will be applied)text
- The link text (html filtering will be applied)
public static java.lang.String createLink(java.lang.String ref, boolean newWindow, java.lang.Object text)
ref
- The referenced URL linknewWindow
- If true, "target='_blank'" will be specifiedtext
- The link text (html filtering will be applied)
public static java.lang.String createLink(java.lang.String ref, boolean newWindow, java.lang.Object text, boolean filterText)
ref
- The referenced URL linknewWindow
- If true, "target='_blank'" will be specifiedtext
- The link textfilterText
- True to apply HTML filtering to the specified text
public static java.lang.String font(java.lang.String family, java.lang.String style, java.lang.String variant, java.lang.String weight, int ptsize)
family
- The font familystyle
- The font style ('normal', 'italic', 'oblique')variant
- The font variant ('normal', 'small-caps')weight
- The font weight ('normal', 'bold', 'bolder', 'lighter', etc)ptsize
- The font point size
public static java.lang.String _font()
public static java.lang.String startJavaScript()
public static java.lang.String endJavaScript()
public static java.lang.String autoRefresh(int delay, java.lang.String url)
delay
- Delay before next updateurl
- The URL to jump to after the delay
public static byte[] readPage_POST(java.lang.String pageURLStr, java.lang.String contentType, byte[] postData, int timeoutMS) throws java.io.IOException
pageURLStr
- The URL to which the POST is sentcontentType
- The MIME type of the POST data sent to the serverpostData
- The data sent to the servertimeoutMS
- Connection timeout in milliseconds (<=0 for indefinite timeout)
java.net.NoRouteToHostException
- if the remote host could not be reached
java.io.IOException
- if an I/O error occurspublic static byte[] readPage_POST(java.net.URL pageURL, java.lang.String contentType, byte[] postData, int timeoutMS) throws java.io.IOException
pageURL
- The URL to which the POST is sentcontentType
- The MIME type of the POST data sent to the serverpostData
- The data sent to the servertimeoutMS
- Connection timeout in milliseconds (<=0 for indefinite timeout)
java.net.NoRouteToHostException
- if the remote host could not be reached
java.io.IOException
- if an I/O error occurspublic static byte[] readPage_POST(java.lang.String pageURLStr, java.util.Properties headerProps, byte[] postData, int timeoutMS) throws java.io.IOException
pageURLStr
- The URL to which the POST is sentheaderProps
- The POST header propertiespostData
- The data sent to the servertimeoutMS
- Connection timeout in milliseconds (<=0 for indefinite timeout)
java.net.NoRouteToHostException
- if the remote host could not be reached
java.io.IOException
- if an I/O error occurspublic static byte[] readPage_POST(java.net.URL pageURL, java.util.Properties headerProps, byte[] postData, int timeoutMS) throws java.io.IOException
pageURL
- The URL to which the POST is sentheaderProps
- The POST header propertiespostData
- The data sent to the servertimeoutMS
- Connection timeout in milliseconds (<=0 for indefinite timeout)
java.net.NoRouteToHostException
- if the remote host could not be reached
java.io.IOException
- if an I/O error occurspublic static byte[] readPage_POST(java.net.URL pageURL, java.util.Properties headerProps, byte[] postData, int timeoutMS, java.util.Map<java.lang.String,java.util.List<java.lang.String>> returnFields) throws java.io.IOException
pageURL
- The URL to which the POST is sentheaderProps
- The POST header propertiespostData
- The data sent to the servertimeoutMS
- Connection timeout in milliseconds (<=0 for indefinite timeout)returnFields
- The returned header fields
java.net.NoRouteToHostException
- if the remote host could not be reached
java.io.IOException
- if an I/O error occurspublic static byte[] readPage_GET(java.lang.String pageURLStr, int timeoutMS) throws java.lang.Throwable
pageURLStr
- The URL to which the GET is senttimeoutMS
- Connection timeout in milliseconds (<=0 for indefinite timeout)
java.net.NoRouteToHostException
- if the remote host could not be reached
java.io.IOException
- if an I/O error occurs
java.lang.Throwable
public static byte[] readPage_GET(java.net.URL pageURL, int timeoutMS) throws java.lang.Throwable
pageURL
- The URL to which the GET is senttimeoutMS
- Connection timeout in milliseconds (<=0 for indefinite timeout)
java.net.NoRouteToHostException
- if the remote host could not be reached
java.io.IOException
- if an I/O error occurs
java.lang.Throwable
public static byte[] readPage_GET_LogError(java.lang.String pageURLStr, int timeoutMS)
pageURLStr
- The URL to which the GET is senttimeoutMS
- Connection timeout in milliseconds (<=0 for indefinite timeout)
public static byte[] readPage_GET_LogError(java.net.URL pageURL, int timeoutMS)
pageURL
- The URL to which the GET is senttimeoutMS
- Connection timeout in milliseconds (<=0 for indefinite timeout)
public static HTMLTools.HttpBufferedInputStream inputStream_GET(java.lang.String pageURLStr, int timeoutMS) throws java.io.IOException
pageURLStr
- The URLtimeoutMS
- Connection timeout in milliseconds (<=0 for indefinite timeout)
java.net.NoRouteToHostException
- if the remote host could not be reached
java.io.IOException
- if an I/O error occurspublic static HTMLTools.HttpBufferedInputStream inputStream_GET(java.net.URL pageURL, int timeoutMS) throws java.io.IOException
pageURL
- The URLtimeoutMS
- Connection timeout in milliseconds (<=0 for indefinite timeout)
java.net.NoRouteToHostException
- if the remote host could not be reached
java.io.IOException
- if an I/O error occurspublic static java.lang.StringBuffer createIFrameTemplate(java.lang.String srcURL, java.lang.StringBuffer sb)
srcURL
- The source URL displayed within the framesb
- The destination StringBuffer
public static java.lang.String createIFrameTemplate(java.lang.String srcURL)
srcURL
- The source URL displayed within the frame
public static java.lang.String createIFrameTemplate(int w, int h, java.lang.String srcURL)
w
- The width of the IFrameh
- The height of the IFramesrcURL
- The source URL displayed within the frame
public static java.lang.StringBuffer createIFrameTemplate(int w, int h, java.lang.String srcURL, java.lang.StringBuffer sb)
w
- The width of the IFrameh
- The height of the IFramesrcURL
- The source URL displayed within the framesb
- The destination StringBuffer
public static void main(java.lang.String[] argv)
argv
- Comand-line arguments
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |