code: protected List<FileWrapper> handleGetAllFileContentWithMetaData(Class<? extends FileEntity> type, Integer entityId) {
          List<FileMeta> metaDataList = this.handleGetEntityMetaFiles(type, entityId);
          // Create an ExecutorService with the number of processors available to the Java virtual machine.
          ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
          // First get all the FileContent
          List<Future<FileContent>> futureList = new ArrayList<Future<FileContent>>();
  
          for (FileMeta metaData : metaDataList) {
              FileWorker fileWorker = new FileWorker(entityId, metaData.getId(), type, this);
              Future<FileContent> fileContent = executor.submit(fileWorker);
              futureList.add(fileContent);
          }
  
          Map<Integer, FileContent> fileContentMap = new HashMap<Integer, FileContent>();
          for (Future<FileContent> future : futureList) {
              try {
                  fileContentMap.put(future.get().getId(), future.get());
              } catch (InterruptedException e) {
                  log.error("Error in bullhornapirest.getAllFileContentWithMetaData", e);
              } catch (ExecutionException e) {
                  log.error("Error in bullhornapirest.getAllFileContentWithMetaData", e);
              }
          }
  
          // shutdown pool, wait until it's done
          executor.shutdown();
          while (!executor.isTerminated()) {
          }
          // null it out
          executor = null;
  
          // Second create the FileWrapper list from the FileContent and FileMeta
          List<FileWrapper> fileWrapperList = new ArrayList<FileWrapper>();
          for (FileMeta metaData : metaDataList) {
              FileContent fileContent = fileContentMap.get(metaData.getId());
              FileWrapper fileWrapper = new StandardFileWrapper(fileContent, metaData);
              fileWrapperList.add(fileWrapper);
          }
          return fileWrapperList;
      }
docs: This method will get all the meta data and then handle the fetching of FileContent in a multi-threaded fashion.
  
  @param type
  @param entityId
  @return