Package jdbm.helper

Examples of jdbm.helper.OpenByteArrayOutputStream


               
        checkIfClosed();
      if(bufferInUse){
        //current reusable buffer is in use, have to fallback into creating new instances
        byte[] buffer = new byte[1024];
        OpenByteArrayOutputStream bao = new OpenByteArrayOutputStream(buffer);
        SerializerOutput out = new SerializerOutput(bao);
        return insert2(obj,serializer,buffer,bao,out);
      }

        try{
View Full Code Here


                                                + recid );
        }
      if(bufferInUse){
        //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);
        update2(recid,obj,serializer,buffer,bao,out);
        return;
      }
View Full Code Here

        }
       
      if(bufferInUse){
        //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);
      }
View Full Code Here

    //custom serializer is provided, use it
   
    Serializer ser = _btree.keySerializer;
    byte[] previous = null;
    byte[] buffer = new byte[1024];
    OpenByteArrayOutputStream out2 = new OpenByteArrayOutputStream(buffer);
    SerializerOutput out3 = new SerializerOutput(out2);
    for (int i = firstUse ; i < _btree._pageSize; i++) {
      if(keys[i] == null){
        LeadingValueCompressionProvider.writeByteArray(oos, null, previous, 0);
      }else{
        out2.reset();
        ser.serialize(out3,keys[i]);
        byte[] b = out2.toByteArray();
        LeadingValueCompressionProvider.writeByteArray(oos, b, previous, 0);
        previous = b;
      }     
    }
     
View Full Code Here

TOP

Related Classes of jdbm.helper.OpenByteArrayOutputStream

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.