code: public OutputStream getOutput(String pathname, boolean append, int chunkSize) throws IOException {
        GridFile file = (GridFile) getFile(pathname, chunkSize);
        checkIsNotDirectory(file);
        createIfNeeded(file);
        return new GridOutputStream(file, append, data);
     }
docs: Opens an OutputStream for writing to the file denoted by pathname.
  @param pathname the file to write to
  @param append if true, the bytes written to the OutputStream will be appended to the end of the file
  @param chunkSize the size of the file's chunks. This parameter is honored only when the file at pathname does
  not yet exist. If the file already exists, the file's own chunkSize has precedence.
  @return the OutputStream for writing to the file
  @throws IOException if the file is a directory, cannot be created or some other error occurs