Class GHBlobBuilder


  • public class GHBlobBuilder
    extends Object
    Builder pattern for creating a new blob. Based on https://developer.github.com/v3/git/blobs/#create-a-blob
    • Method Detail

      • textContent

        public GHBlobBuilder textContent​(String content)
        Configures a blob with the specified text content.
        Parameters:
        content - string text of the blob
        Returns:
        a GHBlobBuilder
      • binaryContent

        public GHBlobBuilder binaryContent​(byte[] content)
        Configures a blob with the specified binary content.
        Parameters:
        content - byte array of the blob
        Returns:
        a GHBlobBuilder
      • create

        public GHBlob create()
                      throws IOException
        Creates a blob based on the parameters specified thus far.
        Returns:
        a GHBlob
        Throws:
        IOException - if the blob cannot be created.