Package org.vanted.updater
Class HttpHttpsURL
java.lang.Object
org.vanted.updater.HttpHttpsURL
public class HttpHttpsURL extends Object
Handles automatic redirects from http to https.
- Since:
- 2.7.0
- Author:
- Dimitar
-
Constructor Summary
Constructors Constructor Description HttpHttpsURL(String spec)
-
Method Summary
Modifier and Type Method Description String
getURL()
This returns the URL's spec.HttpURLConnection
openConnection()
Use this method to open connections with both Http and Https protocols.InputStream
openStream()
This method is a shorthand for:void
setURL(String spec)
Set URL's spec.
-
Constructor Details
-
HttpHttpsURL
-
-
Method Details
-
getURL
This returns the URL's spec. Use it to initialize a URL object.- Returns:
- URL's spec
-
setURL
Set URL's spec.- Parameters:
spec
-
-
openStream
This method is a shorthand for:openConnection().getInputStream()
- Returns:
- Throws:
IOException
-
openConnection
Use this method to open connections with both Http and Https protocols. Also any errors are therewith reported to the user.- Returns:
- a successfully opened connection
- Throws:
IOException
-