Package org.gitlab4j.api.models
Class RepositoryFile
- java.lang.Object
-
- org.gitlab4j.api.models.RepositoryFile
-
public class RepositoryFile extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description RepositoryFile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencodeAndSetContent(byte[] byteContent)Encodes the provided byte array using Base64 and sets it as the content.voidencodeAndSetContent(java.lang.String content)Encodes the provided String using Base64 and sets it as the content.java.lang.StringgetBlobId()java.lang.StringgetCommitId()java.lang.StringgetContent()java.lang.StringgetContentSha256()byte[]getDecodedContentAsBytes()Returns the content as a byte array, decoding from base64 if necessary.java.lang.StringgetDecodedContentAsString()Returns the content as a String, base64 decoding it if necessary.Constants.EncodinggetEncoding()java.lang.StringgetFileName()java.lang.StringgetFilePath()java.lang.StringgetLastCommitId()java.lang.StringgetRef()java.lang.IntegergetSize()voidsetBlobId(java.lang.String blobId)voidsetCommitId(java.lang.String commitId)voidsetContent(java.lang.String content)voidsetContentSha256(java.lang.String contentSha256)voidsetEncoding(Constants.Encoding encoding)voidsetFileName(java.lang.String fileName)voidsetFilePath(java.lang.String filePath)voidsetLastCommitId(java.lang.String lastCommitId)voidsetRef(java.lang.String ref)voidsetSize(java.lang.Integer size)java.lang.StringtoString()
-
-
-
Method Detail
-
getFileName
public java.lang.String getFileName()
-
setFileName
public void setFileName(java.lang.String fileName)
-
getFilePath
public java.lang.String getFilePath()
-
setFilePath
public void setFilePath(java.lang.String filePath)
-
getSize
public java.lang.Integer getSize()
-
setSize
public void setSize(java.lang.Integer size)
-
getEncoding
public Constants.Encoding getEncoding()
-
setEncoding
public void setEncoding(Constants.Encoding encoding)
-
getContent
public java.lang.String getContent()
-
setContent
public void setContent(java.lang.String content)
-
getContentSha256
public java.lang.String getContentSha256()
-
setContentSha256
public void setContentSha256(java.lang.String contentSha256)
-
getRef
public java.lang.String getRef()
-
setRef
public void setRef(java.lang.String ref)
-
getBlobId
public java.lang.String getBlobId()
-
setBlobId
public void setBlobId(java.lang.String blobId)
-
getCommitId
public java.lang.String getCommitId()
-
setCommitId
public void setCommitId(java.lang.String commitId)
-
getLastCommitId
public java.lang.String getLastCommitId()
-
setLastCommitId
public void setLastCommitId(java.lang.String lastCommitId)
-
getDecodedContentAsString
public java.lang.String getDecodedContentAsString()
Returns the content as a String, base64 decoding it if necessary. For binary files it is recommended to use getDecodedContentAsBytes()- Returns:
- the content as a String, base64 decoding it if necessary
-
getDecodedContentAsBytes
public byte[] getDecodedContentAsBytes()
Returns the content as a byte array, decoding from base64 if necessary. For String content it is recommended to use getDecodedContent().- Returns:
- the content as a byte array, decoding from base64 if necessary
-
encodeAndSetContent
public void encodeAndSetContent(java.lang.String content)
Encodes the provided String using Base64 and sets it as the content. The encoding property of this instance will be set to base64.- Parameters:
content- the String content to encode and set as the base64 encoded String content
-
encodeAndSetContent
public void encodeAndSetContent(byte[] byteContent)
Encodes the provided byte array using Base64 and sets it as the content. The encoding property of this instance will be set to base64.- Parameters:
byteContent- the byte[] content to encode and set as the base64 encoded String content
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-