Code example for ObjectInput

Methods: readDouble

0
        public double total = 0;
 
        public SumData() {} 
 
        public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
            total   = in.readDouble();
        } 
 
        public void writeExternal(ObjectOutput out) throws IOException {
            out.writeDouble(total);
        } 
 
    } 
 
    /* (non-Javadoc) 
     * @see org.kie.base.accumulators.AccumulateFunction#createContext() 
     */ 
    public Serializable createContext() {
        return new SumData(); 
    }