|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jgit.patch.FileHeader
public class FileHeader
Patch header describing an action for a single file path.
| Nested Class Summary | |
|---|---|
static class |
FileHeader.ChangeType
General type of change a single file-level patch describes. |
static class |
FileHeader.PatchType
Type of patch used by this file. |
| Field Summary | |
|---|---|
protected FileHeader.ChangeType |
changeType
General type of change indicated by the patch. |
static java.lang.String |
DEV_NULL
Magical file name used for file adds or deletes. |
protected AbbreviatedObjectId |
newId
ObjectId listed on the index line for the new (post-image) |
protected FileMode |
newMode
New mode of the file, if described by the patch, else null. |
| Method Summary | |
|---|---|
byte[] |
getBuffer()
|
FileHeader.ChangeType |
getChangeType()
|
int |
getEndOffset()
|
BinaryHunk |
getForwardBinaryHunk()
|
java.util.List<? extends HunkHeader> |
getHunks()
|
AbbreviatedObjectId |
getNewId()
Get the new object id from the index. |
FileMode |
getNewMode()
|
java.lang.String |
getNewName()
Get the new name associated with this file. |
AbbreviatedObjectId |
getOldId()
Get the old object id from the index. |
FileMode |
getOldMode()
|
java.lang.String |
getOldName()
Get the old name associated with this file. |
FileHeader.PatchType |
getPatchType()
|
BinaryHunk |
getReverseBinaryHunk()
|
int |
getScore()
|
java.lang.String |
getScriptText()
Convert the patch script for this file into a string. |
java.lang.String |
getScriptText(java.nio.charset.Charset oldCharset,
java.nio.charset.Charset newCharset)
Convert the patch script for this file into a string. |
int |
getStartOffset()
|
boolean |
hasMetaDataChanges()
|
EditList |
toEditList()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEV_NULL
protected FileMode newMode
protected FileHeader.ChangeType changeType
protected AbbreviatedObjectId newId
| Method Detail |
|---|
public byte[] getBuffer()
public int getStartOffset()
getBuffer().public int getEndOffset()
public java.lang.String getScriptText()
The default character encoding (Constants.CHARSET) is assumed for
both the old and new files.
public java.lang.String getScriptText(java.nio.charset.Charset oldCharset,
java.nio.charset.Charset newCharset)
oldCharset - hint character set to decode the old lines with.newCharset - hint character set to decode the new lines with.
public java.lang.String getOldName()
The meaning of the old name can differ depending on the semantic meaning of this patch:
/dev/nullgetNewName()
public java.lang.String getNewName()
The meaning of the new name can differ depending on the semantic meaning of this patch:
getOldName()/dev/null
public FileMode getOldMode()
public FileMode getNewMode()
public FileHeader.ChangeType getChangeType()
getNewName()public int getScore()
getOldName() and
getNewName() if getChangeType() is
FileHeader.ChangeType.COPY or FileHeader.ChangeType.RENAME.public AbbreviatedObjectId getOldId()
index.
public AbbreviatedObjectId getNewId()
index.
public FileHeader.PatchType getPatchType()
public boolean hasMetaDataChanges()
public java.util.List<? extends HunkHeader> getHunks()
public BinaryHunk getForwardBinaryHunk()
FileHeader.PatchType.GIT_BINARY, the new-image delta/literalpublic BinaryHunk getReverseBinaryHunk()
FileHeader.PatchType.GIT_BINARY, the old-image delta/literalpublic EditList toEditList()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||