Code example for ObjectInput

Methods: readUTF

0
        out.writeUTF( packageName );
    } 
 
    public void readExternal(ObjectInput in) throws IOException,
                                            ClassNotFoundException { 
        name = in.readUTF();
        packageName = in.readUTF();
    } 
 
    public String getName() {
        return this.name;
    } 
 
    public String getPackageName() {
        return this.packageName;
    } 
 
}