- File file = new File(getLocalPath());
- channel = new RandomAccessFile(file, "rw").getChannel();
- lock = channel.tryLock();
- ChunkFromFileChannelRequestEntity entity = new ChunkFromFileChannelRequestEntity(channel, getMimeType(), CHUNK_SIZE);
- entity.setOnDatatransferProgressListener(getDataTransferListener());
+ File file = new File(getStoragePath());
+ raf = new RandomAccessFile(file, "r");
+ channel = raf.getChannel();
+ ChunkFromFileChannelRequestEntity entity = new ChunkFromFileChannelRequestEntity(channel, getMimeType(), CHUNK_SIZE, file);
+ entity.addOnDatatransferProgressListeners(getDataTransferListeners());