public static void putFile(ServiceClient h,final Operation put,File f) throws IOException {
  final AsynchronousFileChannel ch=AsynchronousFileChannel.open(f.toPath(),StandardOpenOption.READ);
  AtomicInteger completionCount=new AtomicInteger(0);
  String contentType=FileUtils.getContentType(f.toURI());
  final boolean[] fileIsDone={false};
  putChunks(h,put,ch,contentType,f.length(),0,completionCount,fileIsDone);
}

public static void putFile ( ServiceClient h , final Operation put , File f ) throws IOException { final AsynchronousFileChannel ch = AsynchronousFileChannel . open ( f . toPath ( ) , StandardOpenOption . READ ) ; AtomicInteger completionCount = new AtomicInteger ( 0 ) ; String contentType = FileUtils . getContentType ( f . toURI ( ) ) ; final boolean [ ] fileIsDone = { false } ; putChunks ( h , put , ch , contentType , f . length ( ) , 0 , completionCount , fileIsDone ) ; }
given a post operation and a file , post the file to the uri .
