public class StringEncoder extends Object
| Constructor and Description |
|---|
StringEncoder() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(String s)
Decodes the given string that is assumed to be a valid encoding
of a byte array.
|
static String |
encode(byte[] a)
Encodes the given byte array into a string that can be used by
the SQLite database.
|
static String |
encodeX(byte[] a)
Encodes the given byte array into SQLite3 blob notation, ie X'..'
|
public static String encode(byte[] a)
a - the byte array to be encoded. A null reference is handled as
an empty array.decode method
a string of size 1 will return an empty byte array.public static byte[] decode(String s)
encode method.s - the given string encoding.IllegalArgumentException - when the string given is not
a valid encoded string for this encoder.public static String encodeX(byte[] a)
a - the byte array to be encoded. A null reference is handled as
an empty array.Copyright © 2014. All rights reserved.