code: public Optional<MesosFileChunkObject> readSandBoxFile(String taskId, String path, Optional<String> grep, Optional<Long> offset, Optional<Long> length) {
      final Function<String, String> requestUrl = (host) -> String.format(SANDBOX_READ_FILE_FORMAT, getApiBase(host), taskId);
  
      Builder<String, Object> queryParamBuider = ImmutableMap.<String, Object>builder().put("path", path);
  
      if (grep.isPresent()) {
        queryParamBuider.put("grep", grep.get());
      }
      if (offset.isPresent()) {
        queryParamBuider.put("offset", offset.get());
      }
      if (length.isPresent()) {
        queryParamBuider.put("length", length.get());
      }
  
      return getSingleWithParams(requestUrl, "Read sandbox file for task", taskId, Optional.of(queryParamBuider.build()), MesosFileChunkObject.class);
    }
docs: Retrieve part of the contents of a file in a specific task's sandbox.
  
  @param taskId
  The task ID of the sandbox to read from
  @param path
  The path to the file to be read. Relative to the sandbox root (without a leading slash)
  @param grep
  Optional string to grep for
  @param offset
  Byte offset to start reading from
  @param length
  Maximum number of bytes to read
  @return
  A {@link MesosFileChunkObject} that contains the requested partial file contents