public class EncodedSchemaPathSet extends Object
Format of the encoded SchemaPath:
$$ENC\d\dlt;base32 encoded input paths>
We use Base-32 over Base-64 because the later's charset includes '\' and '+'.
Modifier and Type | Field and Description |
---|---|
static String |
ENCODED_STAR_COLUMN |
Constructor and Description |
---|
EncodedSchemaPathSet() |
Modifier and Type | Method and Description |
---|---|
static Collection<SchemaPath> |
decode(Collection<SchemaPath> encodedPaths)
Returns the decoded Collection of SchemaPath from the input which
may contain a mix of encoded and non-encoded SchemaPaths.
|
static String[] |
decode(String... encodedPaths)
Returns the decoded array of SchemaPath strings from the input which
may contain a mix of encoded and non-encoded SchemaPaths.
|
static String[] |
encode(String... schemaPaths)
Returns the encoded array of SchemaPath identifiers from the input array of SchemaPath.
|
static boolean |
isEncodedSchemaPath(SchemaPath schemaPath) |
static boolean |
isEncodedSchemaPath(String schemaPath) |
public static final String ENCODED_STAR_COLUMN
public static String[] encode(String... schemaPaths)
The returned identifiers have the following properties:
We take advantage of the fact that Java's modified utf-8 encoding can never contain embedded null byte.
public static boolean isEncodedSchemaPath(SchemaPath schemaPath)
public static boolean isEncodedSchemaPath(String schemaPath)
public static Collection<SchemaPath> decode(Collection<SchemaPath> encodedPaths)
The size of returned Collection is always equal to or greater than the input array.
The non-encoded SchemaPaths are collated in the beginning to the returned array, in the same order as that of the input array.
public static String[] decode(String... encodedPaths)
The size of returned array is always equal to or greater than the input array.
The non-encoded SchemaPaths are collated in the beginning to the returned array, in the same order as that of the input array.
Copyright © 1970 The Apache Software Foundation. All rights reserved.