setApprovaldata(new String(Base64.encode(baos.toByteArray())));
setApprovaldata(new String(Base64.encode(baos.toByteArray(),false)));
    private void setApprovals(Collection approvals){    	try{    		ByteArrayOutputStream baos = new ByteArrayOutputStream();    		ObjectOutputStream oos = new ObjectOutputStream(baos);    		    		int size = approvals.size();    		oos.writeInt(size);    		Iterator iter = approvals.iterator();    		while(iter.hasNext()){    			Approval next = (Approval) iter.next();    			oos.writeObject(next);    		}    		    		setApprovaldata(new String(Base64.encode(baos.toByteArray())));    	} catch (IOException e) {    		log.error("Error building approvals.",e);    		throw new EJBException(e);    	}    }