Code example for ObjectOutputStream

Methods: writeIntwriteLongwriteObject

0
		this.hashedSecret = hashedSecret;
		this.numReplica = numReplica;
	} 
 
	public void encodeContents(ObjectOutputStream oos) throws IOException {
		oos.writeObject(this.requests);
		oos.writeLong(this.ttl);
		oos.writeObject(this.hashedSecret);
		oos.writeInt(this.numReplica);
	} 
 
	public void decodeContents(ObjectInputStream ois) throws IOException, ClassNotFoundException {
		this.requests = (Memcached.PutRequest[])ois.readObject();
		this.ttl = ois.readLong();
		this.hashedSecret = (ByteArray)ois.readObject();
		this.numReplica = ois.readInt();
	} 
} 
Connect your IDE to all the code out there  Get Codota for Java