code: protected byte[] loadBinaryFile(String file) throws IOException {
          try (InputStream is = resource.getInputStream(file)) {
              return IOUtils.toByteArray(is);
          }
      }
docs: Loads the entire contents of a binary file into a byte array.
  
  @param file The path to the binary file.
  @return The contents of the input file as a byte array
  @throws IOException Exception while reading from file.