org.biffle.cliff.pearl
Interface FileDataListener


public interface FileDataListener

Used by objects that handle callbacks while a PearlConnection implementation is receiving a file.


Method Summary
 void addFileData(long offsetInFile, long dataLength, byte[] data)
          Supplies the listener with more data from the file.
 

Method Detail

addFileData

public void addFileData(long offsetInFile,
                        long dataLength,
                        byte[] data)
Supplies the listener with more data from the file. The byte array is valid only for the duration of this function; do not pass references to it.

Parameters:
offsetInFile - The location of this data in the file, provided as the number of bytes in the file before the first byte in this chunk.
dataLength - The number of bytes in the array that are actually valid. This can even be zero, but don't bother optimizing for that case.
data - A buffer containing the actual bytes. This array is valid only for the duration of this call. Do not store references to it.