for (int i = 0; i< expression.size();i++){
Object o = expression.elementAt(i);
Ptg ptg = (Ptg) o;
byte[] b;
if (o instanceof PtgArray){
PtgArray pa = (PtgArray)o;
b = pa.getPreRecord();
arraybytes = ByteTools.append(pa.getPostRecord(), arraybytes);
hasArray = true;
}else{
b = ptg.getRecord();
}
expbytes = ByteTools.append(b, expbytes);