/** * Returns an input stream for response progress tracking purposes. If request/response progress tracking is not enabled, this * method simply return the given input stream as is. * * @param is the response content input stream * @param progressListener Optional progress listener * @return If the progress listener is non null returns a new input stream decorated with progress reporting functionality. If * progress listener is null it returns the same input stream. */ public static InputStream inputStreamForResponse(InputStream is, ProgressListener progressListener) { return progressListener == null ? is : new ResponseProgressInputStream(is, progressListener); }
/** * Returns an input stream for response progress tracking purposes. If * request/response progress tracking is not enabled, this method simply * return the given input stream as is. * * @param is the response content input stream */ public static InputStream inputStreamForResponse(InputStream is, AmazonWebServiceRequest req) { return req == null ? is : new ResponseProgressInputStream(is, req.getGeneralProgressListener()); }
/** * Returns an input stream for response progress tracking purposes. If request/response progress tracking is not enabled, this * method simply return the given input stream as is. * * @param is the response content input stream * @param progressListener Optional progress listener * @return If the progress listener is non null returns a new input stream decorated with progress reporting functionality. If * progress listener is null it returns the same input stream. */ public static InputStream inputStreamForResponse(InputStream is, ProgressListener progressListener) { return progressListener == null ? is : new ResponseProgressInputStream(is, progressListener); }
/** * Returns an input stream for response progress tracking purposes. If * request/response progress tracking is not enabled, this method simply * return the given input stream as is. * * @param is the response content input stream */ public static InputStream inputStreamForResponse(InputStream is, AmazonWebServiceRequest req) { return req == null ? is : new ResponseProgressInputStream(is, req.getGeneralProgressListener()); }
/** * Returns an input stream for response progress tracking purposes. If request/response progress tracking is not enabled, this * method simply return the given input stream as is. * * @param is the response content input stream * @param progressListener Optional progress listener * @return If the progress listener is non null returns a new input stream decorated with progress reporting functionality. If * progress listener is null it returns the same input stream. */ public static InputStream inputStreamForResponse(InputStream is, ProgressListener progressListener) { return progressListener == null ? is : new ResponseProgressInputStream(is, progressListener); }
/** * Returns an input stream for response progress tracking purposes. If * request/response progress tracking is not enabled, this method simply * return the given input stream as is. * * @param is the response content input stream */ public static InputStream inputStreamForResponse(InputStream is, AmazonWebServiceRequest req) { return req == null ? is : new ResponseProgressInputStream(is, req.getGeneralProgressListener()); }