- Direct Known Subclasses:
- Enclosing class:
public static class QuotedString.BourneStyle extends QuotedStringQuoting style used by the Bourne shell.
Quotes are unconditionally inserted during
quote(String). This protects shell meta-characters like
~from being recognized as special.
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
dequote(byte in, int ip, int ie)Decode a previously quoted input, scanning a UTF-8 encoded buffer.
quote(String in)Quote an input string by the quoting rules.
quoteDescription copied from class:
QuotedStringQuote an input string by the quoting rules.
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.
public String dequote(byte in, int ip, int ie)Description copied from class:
QuotedStringDecode a previously quoted input, scanning a UTF-8 encoded buffer.
This method must match quote such that:
a.equals(dequote(Constants.encode(quote(a))));is true for any
This method removes any opening/closing quotation marks added by