|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jgit.util.QuotedString
org.eclipse.jgit.util.QuotedString.GitPathStyle
public static final class QuotedString.GitPathStyle
Quoting style that obeys the rules Git applies to file names
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.jgit.util.QuotedString |
---|
QuotedString.BourneStyle, QuotedString.BourneUserPathStyle, QuotedString.GitPathStyle |
Field Summary |
---|
Fields inherited from class org.eclipse.jgit.util.QuotedString |
---|
BOURNE, BOURNE_USER_PATH, GIT_PATH |
Method Summary | |
---|---|
java.lang.String |
dequote(byte[] in,
int inPtr,
int inEnd)
Decode a previously quoted input, scanning a UTF-8 encoded buffer. |
java.lang.String |
quote(java.lang.String instr)
Quote an input string by the quoting rules. |
Methods inherited from class org.eclipse.jgit.util.QuotedString |
---|
dequote |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.lang.String quote(java.lang.String instr)
QuotedString
If the input string does not require any quoting, the same String reference is returned to the caller.
Otherwise a quoted string is returned, including the opening and closing quotation marks at the start and end of the string. If the style does not permit raw Unicode characters then the string will first be encoded in UTF-8, with unprintable sequences possibly escaped by the rules.
quote
in class QuotedString
instr
- any non-null Unicode string.
public java.lang.String dequote(byte[] in, int inPtr, int inEnd)
QuotedString
This method must match quote such that:
a.equals(dequote(Constants.encode(quote(a))));is true for any
a
.
This method removes any opening/closing quotation marks added by
QuotedString.quote(String)
.
dequote
in class QuotedString
in
- the input buffer to parse.inPtr
- first position within in
to scan.inEnd
- one position past in in
to scan.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |