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
  • Constructor Details

    • ByteArrayResponse

      protected ByteArrayResponse(@Nonnull GitHubConnectorRequest request, int statusCode, @Nonnull Map<String,List<String>> headers)
      Constructor for ByteArray Response
      Parameters:
      request - the request
      statusCode - the status code
      headers - the headers
  • Method Details

    • bodyStream

      @Nonnull public InputStream bodyStream() throws IOException
      The response body as an InputStream.
      Specified by:
      bodyStream in class GitHubConnectorResponse
      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