/** * @param guid * @param data * @throws IOException */ public void put(int guid, byte[] data) throws IOException { Finger succ = locateSuccessor(guid); if (succ != null) { ChordMessageInterface succChord = rmiChord(succ.getIp(), succ.getPort()); succChord.write( guid, data); // Writes bytes from the specified byte array to this file output stream } // TODO: Store data in the closest node. // before calling this method you need to find the node using // locateSuccessor. }