code: public String getFileFromWorkspace(String fileName) throws IOException {
          InputStream is = client.getFile(URI.create(url + "/ws/" + fileName));
          ByteArrayOutputStream result = new ByteArrayOutputStream();
          byte[] buffer = new byte[1024];
          int length;
          while ((length = is.read(buffer)) != -1) {
              result.write(buffer, 0, length);
          }
          return result.toString("UTF-8");
      }
docs: Get a file from workspace.
  
  @param fileName The name of the file to download from workspace. You can
  also access files which are in sub folders of the workspace.
  @return The string which contains the content of the file.
  @throws IOException in case of an error.