CommitBuilder and TagBuilder.
| Modifier and Type | Field and Description |
|---|---|
| private PersonIdent | |
| private Charset | |
| private GpgSignature | |
| private static final byte[] | hencoding
Byte representation of "encoding". |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract byte[] | Returns: this object in the canonical git format, suitable for storage in a repository.Format this builder's state as a git object. |
| protected PersonIdent | Returns: the author of this object, ornull if not set yetRetrieves the author of this object. |
| public Charset | Returns: the encoding that should be used for the message text.Retrieves the encoding that should be used for the message text. |
| public GpgSignature | Returns: the GPG signature of this object, ornull if the object
is not signedRetrieves the GPG signature of this object. |
| public String | Returns: the complete message; can benull.Retrieves the complete message of the object. |
| protected void | setAuthor(PersonIdent
the new author, must be non- newAuthor)nullSets the author (name, email address, and date) of this object. |
| public void | |
| public void | setGpgSignature(GpgSignature
the signature to set or gpgSignature)null to unsetSets the GPG signature of this object. |
| public void | setMessage(String
the message. message)Sets the message (commit message, or message of an annotated tag). |
| pack-priv static void | |
| pack-priv static void | writeMultiLineHeader(String
signature string with line breaks in, OutputStream output stream out, boolean whether to throw enforceAscii)IllegalArgumentException if non-ASCII
characters are encounteredWrites signature to output as per gpgsig header. |
| author | back to summary |
|---|---|
| private PersonIdent author | |
| encoding | back to summary |
|---|---|
| private Charset encoding | |
| gpgSignature | back to summary |
|---|---|
| private GpgSignature gpgSignature | |
| hencoding | back to summary |
|---|---|
| private static final byte[] hencoding Byte representation of "encoding". | |
| message | back to summary |
|---|---|
| private String message | |
| ObjectBuilder | back to summary |
|---|---|
| public ObjectBuilder() | |
| build | back to summary |
|---|---|
| public abstract byte[] build() throws UnsupportedEncodingException Format this builder's state as a git object.
| |
| getAuthor | back to summary |
|---|---|
| protected PersonIdent getAuthor() Retrieves the author of this object.
| |
| getEncoding | back to summary |
|---|---|
| public Charset getEncoding() Retrieves the encoding that should be used for the message text. | |
| getGpgSignature | back to summary |
|---|---|
| public GpgSignature getGpgSignature() Retrieves the GPG signature of this object.
| |
| getMessage | back to summary |
|---|---|
| public String getMessage() Retrieves the complete message of the object. | |
| setAuthor | back to summary |
|---|---|
| protected void setAuthor(PersonIdent newAuthor) Sets the author (name, email address, and date) of this object.
| |
| setEncoding | back to summary |
|---|---|
| public void setEncoding(Charset encoding) Sets the encoding for the object message.
| |
| setGpgSignature | back to summary |
|---|---|
| public void setGpgSignature(GpgSignature gpgSignature) Sets the GPG signature of this object.
Note, the signature set here will change the payload of the object, i.e.
the output of
| |
| setMessage | back to summary |
|---|---|
| public void setMessage(String message) Sets the message (commit message, or message of an annotated tag).
| |
| writeEncoding | back to summary |
|---|---|
| pack-priv static void writeEncoding(Charset encoding, OutputStream out) throws IOException Writes an "encoding" header.
| |
| writeMultiLineHeader | back to summary |
|---|---|
| pack-priv static void writeMultiLineHeader(String in, OutputStream out, boolean enforceAscii) throws IOException, IllegalArgumentException Writes signature to output as per gpgsig header. CRLF and CR will be sanitized to LF and signature will have a hanging indent of one space starting with line two. A trailing line break is not written; the caller is supposed to terminate the GPG signature header by writing a single newline.
| |