Code example for ObjectOutput

Methods: writeInt, writeUTF

0
		this.numberOfPages = in.readInt();
	} 
 
	@Override 
	public void writeExternal(ObjectOutput out) throws IOException {
		out.writeUTF(name);
		out.writeInt(numberOfPages);
	} 
 
	public int getNumberOfPages() { 
		return numberOfPages;
	} 
 
	public void setNumberOfPages(int numberOfPages) {
		this.numberOfPages = numberOfPages;
	} 
 
	public String getName() {
		return name;
	}