Rice Pastry API

org.mpisws.p2p.filetransfer
Interface FileReceipt

All Superinterfaces:
Cancellable, Receipt

public interface FileReceipt
extends Receipt


Method Summary
 java.io.File getFile()
           
 java.nio.ByteBuffer getMetadata()
          Note that the ByteBuffer will be constructed every time it is requested.
 long getOffset()
           
 
Methods inherited from interface org.mpisws.p2p.filetransfer.Receipt
getPriority, getSize, getUID
 
Methods inherited from interface rice.p2p.commonapi.Cancellable
cancel
 

Method Detail

getFile

java.io.File getFile()

getMetadata

java.nio.ByteBuffer getMetadata()
Note that the ByteBuffer will be constructed every time it is requested. Thus you can always read the metadata from the beginning, but you can't continue reading the ByteBuffer, or call equals()/==, so you must cache it if you can't read it in 1 pass. Note the data is not cleared, only the pointers on the ByteBuffer.

Returns:
A ByteBuffer wrapping the metadata

getOffset

long getOffset()

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection