Package com.amazonaws.util
Class RuntimeHttpUtils
java.lang.Object
com.amazonaws.util.RuntimeHttpUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamfetchFile(URI uri, ClientConfiguration config) Fetches a file from the URI given and returns an input stream to it.static URItoUri(String endpoint, ClientConfiguration config) Returns an URI for the given endpoint.
-
Constructor Details
-
RuntimeHttpUtils
public RuntimeHttpUtils()
-
-
Method Details
-
fetchFile
Fetches a file from the URI given and returns an input stream to it.- Parameters:
uri- the uri of the file to fetchconfig- optional configuration overrides- Returns:
- an InputStream containing the retrieved data
- Throws:
IOException- on error
-
toUri
Returns an URI for the given endpoint. Prefixes the protocol if the endpoint given does not have it.- Throws:
IllegalArgumentException- if the inputs are null.
-