use java NIO to merge chunk files