Module org.kohsuke.github.api
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
- 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
ModifierConstructorDescriptionprotected
ByteArrayResponse
(GitHubConnectorRequest request, int statusCode, Map<String, List<String>> headers) Constructor for ByteArray Response -
Method Summary
Modifier and TypeMethodDescriptionThe response body as anInputStream
.void
close()
protected abstract InputStream
Get the raw implementation specific body stream for this response.Methods inherited from class org.kohsuke.github.connector.GitHubConnectorResponse
allHeaders, header, parseInt, request, statusCode, wrapStream
-
Constructor Details
-
ByteArrayResponse
protected ByteArrayResponse(@Nonnull GitHubConnectorRequest request, int statusCode, @Nonnull Map<String, List<String>> headers) Constructor for ByteArray Response- Parameters:
request
- the requeststatusCode
- the status codeheaders
- the headers
-
-
Method Details
-
bodyStream
The response body as anInputStream
.- Specified by:
bodyStream
in classGitHubConnectorResponse
- Returns:
- the response body
- Throws:
IOException
- if response stream is null or an I/O Exception occurs.
-
rawBodyStream
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
- Throws:
IOException
-