JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.793

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
com.amazonaws.util

Class RuntimeHttpUtils



  • public class RuntimeHttpUtils
    extends Object 
    • Constructor Detail

      • RuntimeHttpUtils

        public RuntimeHttpUtils()
    • 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 fetch
        config - optional configuration overrides
        Returns:
        an InputStream containing the retrieved data
        Throws:
        IOException - on error
      • toUri

        public static URI toUri(String endpoint,
         Protocol protocol)
        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.
      • convertRequestToUrl

        public static URL convertRequestToUrl(Request<?> request,
         boolean removeLeadingSlashInResourcePath,
         boolean urlEncode)
        Converts the specified request object into a URL, containing all the specified parameters, the specified request endpoint, etc.
        Parameters:
        request - The request to convert into a URL.
        removeLeadingSlashInResourcePath - Whether the leading slash in resource-path should be removed before appending to the endpoint.
        urlEncode - True if request resource path should be URL encoded
        Returns:
        A new URL representing the specified request.
        Throws:
        SdkClientException - If the request cannot be converted to a well formed URL.
      • getLambdaEnvironmentTraceId

        public static String getLambdaEnvironmentTraceId()
        Returns the value of the trace id environment variable, if it exists and if there is also a lambda function name environment variable, indicating that the code executes within a lambda
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /