code: public static IoBufferEx getBufferForFile(IoBufferAllocatorEx<?> allocator, File requestFile) throws IOException {
          FileInputStream in = new FileInputStream(requestFile);
          IoBufferEx out = allocator.wrap(allocator.allocate(in.available())).setAutoExpander(allocator);
          try {
              int pos = out.position();
              byte[] buf = new byte[1024 * 8];
              int length;
              while ((length = in.read(buf)) > 0) {
                  out.put(buf, 0, length);
              }
              out.position(pos);
          } finally {
              in.close();
          }
  
          return out;
      }
docs: TODO: should be able to remove this once we can send File down the pipe