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);
}
try{
bufferInUse = true;