Code example for ObjectInput

Methods: readBooleanreadUTF

0
        } 
    } 
 
    public void readExternal(ObjectInput in) throws IOException,
                                            ClassNotFoundException { 
        if ( in.readBoolean() ) {
            msg = in.readUTF();
        } 
 
    } 
 
    public String getMessage() {
        return msg;
    } 
} 
Experience pair programming with AI  Get Codota for Java