public abstract class AbstractKVCommand extends AbstractCommand
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
CSTRING_PATTERN
Matches the doubly-quoted C strings returnd by
toCString(). |
static Pattern |
HEXBYTES_PATTERN
Matches hexadecimal byte strings.
|
log, name, paramParser| Modifier | Constructor and Description |
|---|---|
protected |
AbstractKVCommand(String spec) |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
fromCString(String string)
Parse a
byte[] array encoded as a double-quoted C-string representation by toCString(). |
protected Parser<?> |
getParser(String typeName)
Convert parameter spec type name into a
Parser. |
static String |
toCString(byte[] data)
Convert a
byte[] array into a double-quoted C-string representation, surrounded by double quotes,
with non-ASCII bytes, double-quotes, and backslashes escaped with a backslash. |
getAction, getHelpDetail, getHelpSummary, getName, getSessionModes, getUsage, parsepublic static final Pattern CSTRING_PATTERN
toCString().public static final Pattern HEXBYTES_PATTERN
protected AbstractKVCommand(String spec)
protected Parser<?> getParser(String typeName)
AbstractCommandParser. Used for custom type names not supported by ParamParser.
The implementation in AbstractCommand supports all FieldTypes registered with the
database, type for an object type name (returns Integer), and objid for an object ID
(returns ObjId).
getParser in class AbstractCommandtypeName - parameter type namepublic static String toCString(byte[] data)
byte[] array into a double-quoted C-string representation, surrounded by double quotes,
with non-ASCII bytes, double-quotes, and backslashes escaped with a backslash.
Supported escapes are \\, \", \b, \f, \t, \n, \r, and \xNN.
data - byte arraypublic static byte[] fromCString(String string)
byte[] array encoded as a double-quoted C-string representation by toCString().string - C stringIllegalArgumentException - if string is malformedCopyright © 2016. All rights reserved.