FileChannel#transferTo(long position, long count, WritableByteChannel target); FileChannel#transferFrom(ReadableByteChannel src, long position, long count)
/** * Transfers bytes from origin channel to the given writable byte * channel. * * @param origin The origin channel * @param target The target channel * @return amount The number of bytes that were actually transferred * @throws IOException If some I/O error occurs */ publicstaticlongtransferTo(FileChannel origin, WritableByteChannel target) throws IOException {