Package com.massivecraft.mcore.xlib.bson.types

Examples of com.massivecraft.mcore.xlib.bson.types.ObjectId


            case NUMBER:
                return _buf.getDouble( _dataStart );
      case NUMBER_INT:
    return _buf.getInt( _dataStart );
      case OID:
    return new ObjectId( _buf.getInt( _dataStart ) , _buf.getInt( _dataStart + 4 ) , _buf.getInt( _dataStart + 8 ) );
      case CODE:
            case CODE_W_SCOPE:
                throw new RuntimeException( "can't handle code" );
      case SYMBOL:
      case STRING:
View Full Code Here


        _fs = fs;
        _in = in;
        _filename = filename;
        _closeStreamOnPersist = closeStreamOnPersist;

        _id = new ObjectId();
        _chunkSize = GridFS.DEFAULT_CHUNKSIZE;
        _uploadDate = new Date();
        try {
            _messageDigester = MessageDigest.getInstance("MD5");
        } catch (NoSuchAlgorithmException e) {
View Full Code Here

                _pos += 4;

                final int p3 = Bits.readIntBE(_data, _pos);
                _pos += 4;

                _callback.gotObjectId(name , new ObjectId(p1, p2, p3));
                return true;
            }

            case REF: {
                _pos += 4;

                final String ns = readCstr();

                final int p1 = Bits.readInt(_data, _pos);
                _pos += 4;

                final int p2 = Bits.readInt(_data, _pos);
                _pos += 4;

                final int p3 = Bits.readInt(_data, _pos);
                _pos += 4;

                _callback.gotDBRef(name , ns, new ObjectId(p1, p2, p3));

                return true;
            }

            case DATE: { _callback.gotDate(name , Bits.readLong(_data, _pos)); _pos += 8; return true; }
View Full Code Here

            _callback.gotString(name, _in.readUTF8String() );
            break;

        case OID:
            // OID is stored as big endian
            _callback.gotObjectId( name , new ObjectId( _in.readIntBE() , _in.readIntBE() , _in.readIntBE() ) );
            break;

        case REF:
            _in.readInt()// length of ctring that follows
            String ns = _in.readCStr();
            ObjectId theOID = new ObjectId( _in.readInt() , _in.readInt() , _in.readInt() );
            _callback.gotDBRef( name , ns , theOID );
            break;

        case DATE:
            _callback.gotDate( name , _in.readLong() );
View Full Code Here

TOP

Related Classes of com.massivecraft.mcore.xlib.bson.types.ObjectId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.