Package org.kohsuke.github.connector
Class GitHubConnectorResponse.ByteArrayResponse
- java.lang.Object
-
- org.kohsuke.github.connector.GitHubConnectorResponse
-
- org.kohsuke.github.connector.GitHubConnectorResponse.ByteArrayResponse
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
GitHubConnectorHttpConnectorAdapter.HttpURLConnectionGitHubConnectorResponse
- Enclosing class:
- GitHubConnectorResponse
public abstract static class GitHubConnectorResponse.ByteArrayResponse extends GitHubConnectorResponse
A ByteArrayResponse class
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.kohsuke.github.connector.GitHubConnectorResponse
GitHubConnectorResponse.ByteArrayResponse
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedByteArrayResponse(GitHubConnectorRequest request, int statusCode, Map<String,List<String>> headers)Constructor for ByteArray Response
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description InputStreambodyStream()The response body as anInputStream.voidclose()protected abstract InputStreamrawBodyStream()Get the raw implementation specific body stream for this response.-
Methods inherited from class org.kohsuke.github.connector.GitHubConnectorResponse
allHeaders, header, parseInt, request, statusCode, toHttpURLConnection, wrapStream
-
-
-
-
Method Detail
-
bodyStream
@Nonnull public InputStream bodyStream() throws IOException
The response body as anInputStream.- Specified by:
bodyStreamin classGitHubConnectorResponse- Returns:
- the response body
- Throws:
IOException- if response stream is null or an I/O Exception occurs.
-
rawBodyStream
@CheckForNull protected abstract InputStream rawBodyStream() throws IOException
Get the raw implementation specific body stream for this response. This method will only be called once to completion. If an exception is thrown, it may be called multiple times.- Returns:
- the stream for the raw response
- Throws:
IOException- if an I/O Exception occurs.
-
close
public void close() throws IOException- Throws:
IOException
-
-