2010-11-21 21:19:12 +00:00
|
|
|
package org.klomp.snark;
|
|
|
|
|
2012-09-17 21:32:05 +00:00
|
|
|
import net.i2p.data.ByteArray;
|
|
|
|
|
2010-11-21 21:19:12 +00:00
|
|
|
/**
|
|
|
|
* Callback used to fetch data
|
|
|
|
* @since 0.8.2
|
|
|
|
*/
|
|
|
|
interface DataLoader
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* This is the callback that PeerConnectionOut calls to get the data from disk
|
|
|
|
* @return bytes or null for errors
|
|
|
|
*/
|
2012-09-17 21:32:05 +00:00
|
|
|
public ByteArray loadData(int piece, int begin, int length);
|
2010-11-21 21:19:12 +00:00
|
|
|
}
|