All Known Implementing Classes:
PeerState

interface DataLoader
Callback used to fetch data.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    loadData(int piece, int begin, int length)
    This is the callback that PeerConnectionOut calls to get the data from disk.
  • Method Details

    • loadData

      ByteArray loadData(int piece, int begin, int length)
      This is the callback that PeerConnectionOut calls to get the data from disk.
      Parameters:
      piece - index of the requested piece
      begin - byte offset within the piece where the request starts
      length - number of bytes requested
      Returns:
      bytes or null for errors