Modifier and Type | Field and Description |
---|---|
protected static Charset |
_utf8
Deprecated.
Use
Charset.forName(String) to create UTF-8 charset. |
static byte |
ARRAY |
static byte |
B_BINARY |
static byte |
B_FUNC |
static byte |
B_GENERAL |
static byte |
B_UUID |
static byte |
BINARY |
static byte |
BOOLEAN |
static byte |
CODE |
static byte |
CODE_W_SCOPE |
static byte |
DATE |
static byte |
EOO |
static byte |
MAXKEY |
static byte |
MINKEY |
static byte |
NULL |
static byte |
NUMBER |
static byte |
NUMBER_INT |
static byte |
NUMBER_LONG |
static byte |
OBJECT |
static byte |
OID |
static byte |
REF |
static byte |
REGEX |
static byte |
STRING |
static byte |
SYMBOL |
static byte |
TIMESTAMP |
static byte |
UNDEFINED |
Constructor and Description |
---|
BSON() |
Modifier and Type | Method and Description |
---|---|
static void |
addDecodingHook(Class c,
Transformer t) |
static void |
addEncodingHook(Class c,
Transformer t) |
static Object |
applyDecodingHooks(Object o) |
static Object |
applyEncodingHooks(Object o) |
static void |
clearAllHooks() |
static void |
clearDecodingHooks()
Clears *all* decoding hooks.
|
static void |
clearEncodingHooks()
Clears *all* encoding hooks.
|
static BSONObject |
decode(byte[] b) |
static byte[] |
encode(BSONObject o) |
static List<Transformer> |
getDecodingHooks(Class c)
Returns the decoding hook(s) associated with the specific class
|
static List<Transformer> |
getEncodingHooks(Class c)
Returns the encoding hook(s) associated with the specified class
|
static boolean |
hasDecodeHooks() |
static int |
regexFlag(char c) |
static String |
regexFlags(int flags)
Converts Java regular expression flags into a string of flags for the database
|
static int |
regexFlags(String flags)
Converts a string of regular expression flags from the database in Java regular
expression flags.
|
static void |
removeDecodingHook(Class c,
Transformer t)
Remove a specific encoding hook for a specific class.
|
static void |
removeDecodingHooks(Class c)
Remove all decoding hooks for a specific class.
|
static void |
removeEncodingHook(Class c,
Transformer t)
Remove a specific encoding hook for a specific class.
|
static void |
removeEncodingHooks(Class c)
Remove all encoding hooks for a specific class.
|
static int |
toInt(Object o) |
public static final byte EOO
public static final byte NUMBER
public static final byte STRING
public static final byte OBJECT
public static final byte ARRAY
public static final byte BINARY
public static final byte UNDEFINED
public static final byte OID
public static final byte BOOLEAN
public static final byte DATE
public static final byte NULL
public static final byte REGEX
public static final byte REF
public static final byte CODE
public static final byte SYMBOL
public static final byte CODE_W_SCOPE
public static final byte NUMBER_INT
public static final byte TIMESTAMP
public static final byte NUMBER_LONG
public static final byte MINKEY
public static final byte MAXKEY
public static final byte B_GENERAL
public static final byte B_FUNC
public static final byte B_BINARY
public static final byte B_UUID
@Deprecated protected static Charset _utf8
Charset.forName(String)
to create UTF-8 charset.public static int regexFlags(String flags)
flags
- flags from databasepublic static int regexFlag(char c)
public static String regexFlags(int flags)
flags
- Java flagspublic static boolean hasDecodeHooks()
public static void addEncodingHook(Class c, Transformer t)
public static void addDecodingHook(Class c, Transformer t)
public static List<Transformer> getEncodingHooks(Class c)
public static void clearEncodingHooks()
public static void removeEncodingHooks(Class c)
public static void removeEncodingHook(Class c, Transformer t)
public static List<Transformer> getDecodingHooks(Class c)
public static void clearDecodingHooks()
public static void removeDecodingHooks(Class c)
public static void removeDecodingHook(Class c, Transformer t)
public static void clearAllHooks()
public static byte[] encode(BSONObject o)
public static BSONObject decode(byte[] b)
public static int toInt(Object o)