Package com.amazonaws.util
Class RuntimeHttpUtils
- java.lang.Object
-
- com.amazonaws.util.RuntimeHttpUtils
-
public class RuntimeHttpUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description RuntimeHttpUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InputStream
fetchFile(URI uri, ClientConfiguration config)
Fetches a file from the URI given and returns an input stream to it.static URI
toUri(String endpoint, ClientConfiguration config)
Returns an URI for the given endpoint.
-
-
-
Method Detail
-
fetchFile
public static InputStream fetchFile(URI uri, ClientConfiguration config) throws IOException
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
public static URI toUri(String endpoint, ClientConfiguration config)
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.
-
-