Package org.loboevolution.net
Class HttpNetwork
java.lang.Object
org.loboevolution.net.HttpNetwork
HttpNetwork class.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Constant GZIP_ENCODING="gzip"static final int
Constant TIMEOUT_VALUE="2000" -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Image
getImage
(HTMLElement element, TimingInfo info, boolean useBaseUri) getImage.static InputStream
getInputStream
(URLConnection connection) getInputStream.static String
getSource.static URLConnection
getURLConnection
(URI uri, Proxy proxy, String method) static InputStream
openConnectionCheckRedirects.static String
sourceResponse
(URI scriptURI, String integrity) static String
toString
(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
- aURLConnection
object.- Returns:
- a
InputStream
object. - Throws:
IOException
- if any.
-
getImage
getImage.
- Parameters:
element
- aHTMLElement
object.useBaseUri
- aBoolean
object.- Returns:
- a
Image
object.
-
getSource
getSource.
-
getURLConnection
- Throws:
Exception
-
sourceResponse
-
openConnectionCheckRedirects
openConnectionCheckRedirects.
- Parameters:
c
- aURLConnection
object.- Returns:
- a
InputStream
object. - Throws:
Exception
- if any.
-
toString
toString.
- Parameters:
inputStream
- aInputStream
object.- Returns:
- a
String
object. - Throws:
IOException
- if any.
-