code: private static ByteBuffer getData(ClassLoader loader, String resourceName,
              String itemPath, boolean required) {
          ByteBuffer bytes = getDataFromFile(itemPath);
          if (bytes != null) {
              return bytes;
          }
          if (loader == null) {
              loader = ClassLoaderUtil.getClassLoader(ICUData.class);
          }
          if (resourceName == null) {
              resourceName = ICUData.ICU_BASE_NAME + '/' + itemPath;
          }
          ByteBuffer buffer = null;
          try {
              @SuppressWarnings("resource")  // Closed by getByteBufferFromInputStreamAndCloseStream().
              InputStream is = ICUData.getStream(loader, resourceName, required);
              if (is == null) {
                  return null;
              }
              buffer = getByteBufferFromInputStreamAndCloseStream(is);
          } catch (IOException e) {
              throw new ICUUncheckedIOException(e);
          }
          return buffer;
      }
docs: Loads an ICU binary data file and returns it as a ByteBuffer.
  The buffer contents is normally read-only, but its position etc. can be modified.
  
  @param loader Used for loader.getResourceAsStream() unless the data is found elsewhere.
  @param resourceName Resource name for use with the loader.
  @param itemPath Relative ICU data item path, for example "root.res" or "coll/ucadata.icu".
  @param required If the resource cannot be found,
  this method returns null (!required) or throws an exception (required).
  @return The data as a read-only ByteBuffer,
  or null if required==false and the resource could not be found.
  @throws MissingResourceException if required==true and the resource could not be found