/** * Perform write. * * @param data Data to be written. * @return {@code True} in case operation was enqueued. */ boolean write(final byte[] data) { return addTask(new GridGgfsFileWorkerTask() { @Override public void execute() throws GridException { try { out.write(data); } catch (IOException e) { throw new GridException("Failed to write data to the file due to secondary file system " + "exception: " + path, e); } } }); }
/** * Perform write. * * @param data Data to be written. * @return {@code True} in case operation was enqueued. */ boolean write(final byte[] data) { return addTask(new GridGgfsFileWorkerTask() { @Override public void execute() throws GridException { try { out.write(data); } catch (IOException e) { throw new GridException("Failed to write data to the file due to secondary file system " + "exception: " + path, e); } } }); }