Code example for ObjectInput

Methods: readFloat

0
     * @throws ClassNotFoundException 
     * @see java.io.Externalizable 
     */ 
    public void readExternal(ObjectInput in) throws IOException,
            ClassNotFoundException { 
        x = in.readFloat();
        y = in.readFloat();
    } 
 
    /** 
     * Used with serialization. Not to be called manually. 
     *  
     * @param out 
     *            ObjectOutput 
     * @throws IOException 
     * @see java.io.Externalizable 
     */ 
    public void writeExternal(ObjectOutput out) throws IOException {
        out.writeFloat(x);
        out.writeFloat(y);
    }