com.aelitis.azureus.core.diskmanager.file.impl
Class FMFileAccessCompact
java.lang.Object
com.aelitis.azureus.core.diskmanager.file.impl.FMFileAccessCompact
- All Implemented Interfaces:
- FMFileAccess
public class FMFileAccessCompact
- extends Object
- implements FMFileAccess
Method Summary |
void |
aboutToOpen()
|
void |
flush()
|
FMFileImpl |
getFile()
|
protected long |
getFirstPieceLength()
|
protected long |
getFirstPieceStart()
|
protected long |
getLastPieceLength()
|
protected long |
getLastPieceStart()
|
long |
getLength(RandomAccessFile raf)
|
String |
getString()
|
boolean |
isPieceCompleteProcessingNeeded(int piece_number)
|
void |
read(RandomAccessFile raf,
DirectByteBuffer[] buffers,
long position)
|
protected void |
read(RandomAccessFile raf,
DirectByteBuffer buffer,
long position)
|
protected void |
readState()
|
void |
setLength(RandomAccessFile raf,
long length)
|
void |
setPieceComplete(RandomAccessFile raf,
int piece_number,
DirectByteBuffer piece_data)
|
void |
write(RandomAccessFile raf,
DirectByteBuffer[] buffers,
long position)
|
protected void |
write(RandomAccessFile raf,
DirectByteBuffer buffer,
long position)
|
protected void |
writeState()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FMFileAccessCompact
protected FMFileAccessCompact(TOTorrentFile _torrent_file,
File _controlFileDir,
String _controlFileName,
FMFileAccess _delegate)
throws FMFileManagerException
- Throws:
FMFileManagerException
getFirstPieceStart
protected long getFirstPieceStart()
getFirstPieceLength
protected long getFirstPieceLength()
getLastPieceStart
protected long getLastPieceStart()
getLastPieceLength
protected long getLastPieceLength()
aboutToOpen
public void aboutToOpen()
throws FMFileManagerException
- Specified by:
aboutToOpen
in interface FMFileAccess
- Throws:
FMFileManagerException
getLength
public long getLength(RandomAccessFile raf)
throws FMFileManagerException
- Specified by:
getLength
in interface FMFileAccess
- Throws:
FMFileManagerException
setLength
public void setLength(RandomAccessFile raf,
long length)
throws FMFileManagerException
- Specified by:
setLength
in interface FMFileAccess
- Throws:
FMFileManagerException
read
protected void read(RandomAccessFile raf,
DirectByteBuffer buffer,
long position)
throws FMFileManagerException
- Throws:
FMFileManagerException
read
public void read(RandomAccessFile raf,
DirectByteBuffer[] buffers,
long position)
throws FMFileManagerException
- Specified by:
read
in interface FMFileAccess
- Throws:
FMFileManagerException
write
protected void write(RandomAccessFile raf,
DirectByteBuffer buffer,
long position)
throws FMFileManagerException
- Throws:
FMFileManagerException
write
public void write(RandomAccessFile raf,
DirectByteBuffer[] buffers,
long position)
throws FMFileManagerException
- Specified by:
write
in interface FMFileAccess
- Throws:
FMFileManagerException
flush
public void flush()
throws FMFileManagerException
- Specified by:
flush
in interface FMFileAccess
- Throws:
FMFileManagerException
isPieceCompleteProcessingNeeded
public boolean isPieceCompleteProcessingNeeded(int piece_number)
- Specified by:
isPieceCompleteProcessingNeeded
in interface FMFileAccess
setPieceComplete
public void setPieceComplete(RandomAccessFile raf,
int piece_number,
DirectByteBuffer piece_data)
throws FMFileManagerException
- Specified by:
setPieceComplete
in interface FMFileAccess
- Throws:
FMFileManagerException
readState
protected void readState()
throws FMFileManagerException
- Throws:
FMFileManagerException
writeState
protected void writeState()
throws FMFileManagerException
- Throws:
FMFileManagerException
getFile
public FMFileImpl getFile()
- Specified by:
getFile
in interface FMFileAccess
getString
public String getString()
- Specified by:
getString
in interface FMFileAccess