Code example for ObjectOutput

Methods: writeLongwriteObject

0
		return timeToLive;
	} 
 
	@Override 
	public void writeExternal(ObjectOutput out) throws IOException {
		out.writeLong(timeToLive);
		out.writeObject(value);
	} 
 
	@Override 
	public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
		this.timeToLive = in.readLong();
		this.value = in.readObject();
	} 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java