Package jdbm

Examples of jdbm.SerializerInput


        inflater = new Inflater();        
      }else{
        inflater.reset();
      }
     
      return new SerializerInput(new InflaterInputStream(data,inflater));
  }
View Full Code Here


        //current reusable buffer is in use, have to create new instances
        byte[] buffer = new byte[1024];
        OpenByteArrayOutputStream bao = new OpenByteArrayOutputStream(buffer);
        SerializerOutput out = new SerializerOutput(bao);
        OpenByteArrayInputStream bai = new OpenByteArrayInputStream(buffer);
        SerializerInput in = new SerializerInput(bai);
        return fetch2(recid,serializer,buffer,bao,out, bai,in);
      }
        try{
          bufferInUse = true;
                _insertOut.__resetWrittenCounter();
View Full Code Here

        if(tree.keySerializer!=null){
            //deserialize from byte array
            for(int i =0; i<keys.size(); i++){
                byte[] serialized = (byte[]) keys.get(i);
                if(serialized == nullcontinue;
                K key = tree.keySerializer.deserialize(new SerializerInput(new ByteArrayInputStream(serialized)));
                keys.set(i, key);
            }
        }
        _keys = keys;

         //read values
        _values = new ArrayList<V>(_keys.size());
        for(int i = 0;i<_keys.size();i++){
          if(_keys.get(i) == null)
            _values.add(null);
          else if(tree.valueSerializer==null)
            _values.add((V) Serialization.readObject(in));
            else{
                byte[] serialized = BPage.readByteArray( in );
                  V val = tree.valueSerializer.deserialize(new SerializerInput(new ByteArrayInputStream(serialized)));
              _values.add(val);
            }
        }

    }
View Full Code Here

      }else{
           
        for ( int i=bpage._first; i<_btree._pageSize; i++ ) {                 
              byte[] serialized = readByteArray( ois );
              if ( serialized != null ) {
                  bpage._values[ i ] = _btree.valueSerializer.deserialize( new SerializerInput( new ByteArrayInputStream(serialized)) );
              }
          }
      }
  }
View Full Code Here

      }

     
      Serializer ser = _btree.keySerializer!=null? _btree.keySerializer : DefaultSerializer.INSTANCE;
      OpenByteArrayInputStream in1 = null;
      SerializerInput in2 = null;
      byte[] previous = null;
      for(int i = firstUse;i<_btree._pageSize;i++){
        byte[] b = LeadingValueCompressionProvider.readByteArray(ois, previous, 0);
        if(b == null ) continue;
        if(in1 == null){
          in1 = new OpenByteArrayInputStream(b);
          in2 = new SerializerInput(in1);
        }
        in1.reset(b, b.length);
        ret[i] = ser.deserialize(in2);
        previous = b;
      }
View Full Code Here

TOP

Related Classes of jdbm.SerializerInput

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.