Code example for ObjectInput

Methods: readBytereadInt

0
        return channel;
    } 
 
    @Override 
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        charid = in.readInt();
        channel = in.readByte();
    } 
 
    @Override 
    public void writeExternal(ObjectOutput out) throws IOException {
        out.writeInt(charid);
        out.writeByte(channel);
    } 
 
    @Override 
    public int compareTo(CharacterIdChannelPair o) {
        return channel - o.channel;
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java