public static class QuotedString.BourneStyle extends QuotedString
Quotes are unconditionally inserted during quote(String). This
protects shell meta-characters like $ or ~ from
being recognized as special.
QuotedString.BourneStyle, QuotedString.BourneUserPathStyle, QuotedString.GitPathStyleBOURNE, BOURNE_USER_PATH, GIT_PATH| Constructor and Description |
|---|
QuotedString.BourneStyle() |
| Modifier and Type | Method and Description |
|---|---|
String |
dequote(byte[] in,
int ip,
int ie)
Decode a previously quoted input, scanning a UTF-8 encoded buffer.
|
String |
quote(String in)
Quote an input string by the quoting rules.
|
dequotepublic String quote(String in)
QuotedStringIf 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 QuotedStringin - any non-null Unicode string.public String dequote(byte[] in, int ip, int ie)
QuotedStringThis 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 QuotedStringin - the input buffer to parse.ip - first position within in to scan.ie - one position past in in to scan.Copyright © 2014. All rights reserved.