Code example for DataInput

Methods: readInt, readUTF, readUnsignedByte

0
		return ID;
	} 
 
	@Override 
	public void parseFromInput(DataInput in) throws IOException {
		this.name = in.readUTF();
		this.objectId = in.readInt();
		this.numStars = in.readInt();
		this.bubbleTime = in.readUnsignedByte();
		this.recipient = in.readUTF();
		this.text = in.readUTF();
		this.cleanText = in.readUTF();
	} 
 
	@Override 
	public void writeToOutput(DataOutput out) throws IOException {
		out.writeUTF(this.name);
		out.writeInt(this.objectId);
		out.writeInt(this.numStars);
		out.writeByte(this.bubbleTime);
		out.writeUTF(this.recipient);