Package org.loboevolution.net
Class HttpNetwork
java.lang.Object
org.loboevolution.net.HttpNetwork
HttpNetwork class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant GZIP_ENCODING="gzip"static final intConstant TIMEOUT_VALUE="2000" -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImagegetImage(HTMLElement element, TimingInfo info, boolean useBaseUri) getImage.static InputStreamgetInputStream(URLConnection connection) getInputStream.static StringgetSource.static URLConnectiongetURLConnection(URI uri, Proxy proxy, String method) static InputStreamopenConnectionCheckRedirects.static StringsourceResponse(URI scriptURI, String integrity) static StringtoString(InputStream inputStream) toString.
-
Field Details
-
GZIP_ENCODING
Constant GZIP_ENCODING="gzip"- See Also:
-
TIMEOUT_VALUE
public static final int TIMEOUT_VALUEConstant TIMEOUT_VALUE="2000"- See Also:
-
-
Constructor Details
-
HttpNetwork
public HttpNetwork()
-
-
Method Details
-
getInputStream
getInputStream.
- Parameters:
connection- aURLConnectionobject.- Returns:
- a
InputStreamobject. - Throws:
IOException- if any.
-
getImage
getImage.
- Parameters:
element- aHTMLElementobject.useBaseUri- aBooleanobject.- Returns:
- a
Imageobject.
-
getSource
getSource.
-
getURLConnection
- Throws:
Exception
-
sourceResponse
-
openConnectionCheckRedirects
openConnectionCheckRedirects.
- Parameters:
c- aURLConnectionobject.- Returns:
- a
InputStreamobject. - Throws:
Exception- if any.
-
toString
toString.
- Parameters:
inputStream- aInputStreamobject.- Returns:
- a
Stringobject. - Throws:
IOException- if any.
-