public class GHContent
extends java.lang.Object
GHRepository.getFileContent(String)| Constructor and Description |
|---|
GHContent() |
| Modifier and Type | Method and Description |
|---|---|
GHContentUpdateResponse |
delete(java.lang.String message) |
GHContentUpdateResponse |
delete(java.lang.String commitMessage,
java.lang.String branch) |
java.lang.String |
getContent()
Deprecated.
Use
read() |
java.lang.String |
getDownloadUrl()
URL to retrieve the raw content of the file.
|
java.lang.String |
getEncodedContent()
Deprecated.
Use
read() |
java.lang.String |
getEncoding() |
java.lang.String |
getGitUrl() |
java.lang.String |
getHtmlUrl() |
java.lang.String |
getName() |
GHRepository |
getOwner() |
java.lang.String |
getPath() |
java.lang.String |
getSha() |
long |
getSize() |
java.lang.String |
getType() |
java.lang.String |
getUrl() |
boolean |
isDirectory() |
boolean |
isFile() |
PagedIterable<GHContent> |
listDirectoryContent()
List immediate children of this directory.
|
protected void |
populate()
Fully populate the data by retrieving missing data.
|
java.io.InputStream |
read()
Retrieves the actual content stored here.
|
GHContentUpdateResponse |
update(byte[] newContentBytes,
java.lang.String commitMessage) |
GHContentUpdateResponse |
update(byte[] newContentBytes,
java.lang.String commitMessage,
java.lang.String branch) |
GHContentUpdateResponse |
update(java.lang.String newContent,
java.lang.String commitMessage) |
GHContentUpdateResponse |
update(java.lang.String newContent,
java.lang.String commitMessage,
java.lang.String branch) |
static GHContent[] |
wrap(GHContent[] contents,
GHRepository repository) |
public GHRepository getOwner()
public java.lang.String getType()
public java.lang.String getEncoding()
public long getSize()
public java.lang.String getSha()
public java.lang.String getName()
public java.lang.String getPath()
public java.lang.String getContent()
throws java.io.IOException
read()Due to the nature of GitHub's API, you're not guaranteed that the content will already be populated, so this may trigger network activity, and can throw an IOException.
java.io.IOExceptionpublic java.lang.String getEncodedContent()
throws java.io.IOException
read()Due to the nature of GitHub's API, you're not guaranteed that the content will already be populated, so this may trigger network activity, and can throw an IOException.
java.io.IOExceptionpublic java.lang.String getUrl()
public java.lang.String getGitUrl()
public java.lang.String getHtmlUrl()
public java.io.InputStream read()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getDownloadUrl()
throws java.io.IOException
java.io.IOExceptionpublic boolean isFile()
public boolean isDirectory()
protected void populate()
throws java.io.IOException
java.io.IOExceptionpublic PagedIterable<GHContent> listDirectoryContent() throws java.io.IOException
java.io.IOExceptionpublic GHContentUpdateResponse update(java.lang.String newContent, java.lang.String commitMessage) throws java.io.IOException
java.io.IOExceptionpublic GHContentUpdateResponse update(java.lang.String newContent, java.lang.String commitMessage, java.lang.String branch) throws java.io.IOException
java.io.IOExceptionpublic GHContentUpdateResponse update(byte[] newContentBytes, java.lang.String commitMessage) throws java.io.IOException
java.io.IOExceptionpublic GHContentUpdateResponse update(byte[] newContentBytes, java.lang.String commitMessage, java.lang.String branch) throws java.io.IOException
java.io.IOExceptionpublic GHContentUpdateResponse delete(java.lang.String message) throws java.io.IOException
java.io.IOExceptionpublic GHContentUpdateResponse delete(java.lang.String commitMessage, java.lang.String branch) throws java.io.IOException
java.io.IOExceptionpublic static GHContent[] wrap(GHContent[] contents, GHRepository repository)
Copyright © 2016. All Rights Reserved.