org.ejdb.bson
Class BSON

java.lang.Object
  extended by org.ejdb.bson.BSON

public final class BSON
extends java.lang.Object

Util class for encode/decode BSON objects

Version:
$Id$
Author:
Tyutyunkov Vyacheslav (tve@softmotions.com)

Field Summary
static byte ARRAY
           
static byte BINARY
           
static byte BOOLEAN
           
static byte DATE
           
static byte DOUBLE
           
static byte INT
           
static byte LONG
           
static byte NULL
           
static byte OBJECT
           
static byte OBJECT_ID
           
static byte REGEX
           
static byte STRING
           
 
Method Summary
static BSONObject decode(byte[] data)
          Decode BSON object from plain byte array
static byte[] encode(BSONObject obj)
          Encode BSON object to plain byte array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL

public static final byte NULL
See Also:
Constant Field Values

INT

public static final byte INT
See Also:
Constant Field Values

LONG

public static final byte LONG
See Also:
Constant Field Values

DOUBLE

public static final byte DOUBLE
See Also:
Constant Field Values

STRING

public static final byte STRING
See Also:
Constant Field Values

BOOLEAN

public static final byte BOOLEAN
See Also:
Constant Field Values

OBJECT_ID

public static final byte OBJECT_ID
See Also:
Constant Field Values

OBJECT

public static final byte OBJECT
See Also:
Constant Field Values

BINARY

public static final byte BINARY
See Also:
Constant Field Values

ARRAY

public static final byte ARRAY
See Also:
Constant Field Values

DATE

public static final byte DATE
See Also:
Constant Field Values

REGEX

public static final byte REGEX
See Also:
Constant Field Values
Method Detail

encode

public static byte[] encode(BSONObject obj)
Encode BSON object to plain byte array


decode

public static BSONObject decode(byte[] data)
Decode BSON object from plain byte array