Code example for ObjectInput

Methods: readInt

0
    public LogEvent(final int type) {
        this.type = type;
    } 
 
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        type    = in.readInt();
    } 
 
    public void writeExternal(ObjectOutput out) throws IOException {
        out.writeInt(type);
    } 
     
    /** 
     * Returns the type of the log event as defined in this class. 
     *  
     * @return The type of the log event. 
     */ 
    public int getType() { 
        return this.type;
    } 
Experience pair programming with AI  Get Codota for Java