Class HttpInputStreamUtil
java.lang.Object
org.apache.logging.log4j.core.util.internal.HttpInputStreamUtil
Utility method for reading data from an HTTP InputStream.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpInputStreamUtil.ResultgetInputStream(LastModifiedSource source, AuthorizationProvider authorizationProvider) Retrieves an HTTP resource if it has been modified.static byte[]
-
Constructor Details
-
HttpInputStreamUtil
public HttpInputStreamUtil()
-
-
Method Details
-
getInputStream
public static HttpInputStreamUtil.Result getInputStream(LastModifiedSource source, AuthorizationProvider authorizationProvider) Retrieves an HTTP resource if it has been modified.Side effects: if the request is successful, the last modified time of the
sourceparameter is modified.- Parameters:
source- The location of the HTTP resourceauthorizationProvider- The authentication data for the HTTP request- Returns:
- A
HttpInputStreamUtil.Resultobject containing the status code and body of the response
-
readStream
- Throws:
IOException
-