Package org.kohsuke.github
Class GHBlobBuilder
- java.lang.Object
-
- org.kohsuke.github.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GHBlobBuilderbinaryContent(byte[] content)Configures a blob with the specified binarycontent.GHBlobcreate()Creates a blob based on the parameters specified thus far.GHBlobBuildertextContent(String content)Configures a blob with the specified textcontent.
-
-
-
Method Detail
-
textContent
public GHBlobBuilder textContent(String content)
Configures a blob with the specified textcontent.- Parameters:
content- string text of the blob- Returns:
- a GHBlobBuilder
-
binaryContent
public GHBlobBuilder binaryContent(byte[] content)
Configures a blob with the specified binarycontent.- 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.
-
-