private DiskDumpInfoEntry dumpCacheEntry(Entry entry) throws IOException {
    EntryImpl entryImpl = (EntryImpl) entry;
    String firstBits = "";
    byte[] bytes = entryImpl.getResource().read();
    String type = typeOfBytes(bytes);
    if (type.equals("undefined") && bytes.length >= 4) {
      firstBits =
          String.format(
              (Locale) null, "0x%02X 0x%02X 0x%02X 0x%02X", bytes[0], bytes[1], bytes[2], bytes[3]);
    }
    String path = entryImpl.getResource().getFile().getPath();
    return new DiskDumpInfoEntry(entryImpl.getId(), path, type, entryImpl.getSize(), firstBits);
  }
Creates the directory (and its parents, if necessary). In case of an exception, log an error
message with the relevant parameters

@param directory the directory to create
@param message message to use
@throws IOException
imagepipeline-base/src/main/java/com/facebook/cache/disk/DefaultDiskStorage.java