private static int getLength(String pathname) {
    return pathname == null ? -1 : (int) FileUtil.length(pathname);
  }
Wrapper around File operations to enable mocking in tests.
imagepipeline/src/main/java/com/facebook/imagepipeline/producers/LocalContentUriThumbnailFetchProducer.java