com.aelitis.azureus.core.diskmanager.file.impl
Class FMFileAccessLinear

java.lang.Object
  extended by com.aelitis.azureus.core.diskmanager.file.impl.FMFileAccessLinear
All Implemented Interfaces:
FMFileAccess

public class FMFileAccessLinear
extends java.lang.Object
implements FMFileAccess


Constructor Summary
protected FMFileAccessLinear(FMFileImpl _owner)
           
 
Method Summary
 void aboutToOpen()
           
 void flush()
           
 FMFileImpl getFile()
           
 long getLength(java.io.RandomAccessFile raf)
           
 java.lang.String getString()
           
 boolean isPieceCompleteProcessingNeeded(int piece_number)
           
 void read(java.io.RandomAccessFile raf, DirectByteBuffer[] buffers, long offset)
           
 void read(java.io.RandomAccessFile raf, DirectByteBuffer buffer, long offset)
           
 void setLength(java.io.RandomAccessFile raf, long length)
           
 void setPieceComplete(java.io.RandomAccessFile raf, int piece_number, DirectByteBuffer piece_data)
           
 void write(java.io.RandomAccessFile raf, DirectByteBuffer[] buffers, long position)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FMFileAccessLinear

protected FMFileAccessLinear(FMFileImpl _owner)
Method Detail

aboutToOpen

public void aboutToOpen()
                 throws FMFileManagerException
Specified by:
aboutToOpen in interface FMFileAccess
Throws:
FMFileManagerException

getLength

public long getLength(java.io.RandomAccessFile raf)
               throws FMFileManagerException
Specified by:
getLength in interface FMFileAccess
Throws:
FMFileManagerException

setLength

public void setLength(java.io.RandomAccessFile raf,
                      long length)
               throws FMFileManagerException
Specified by:
setLength in interface FMFileAccess
Throws:
FMFileManagerException

isPieceCompleteProcessingNeeded

public boolean isPieceCompleteProcessingNeeded(int piece_number)
Specified by:
isPieceCompleteProcessingNeeded in interface FMFileAccess

setPieceComplete

public void setPieceComplete(java.io.RandomAccessFile raf,
                             int piece_number,
                             DirectByteBuffer piece_data)
                      throws FMFileManagerException
Specified by:
setPieceComplete in interface FMFileAccess
Throws:
FMFileManagerException

read

public void read(java.io.RandomAccessFile raf,
                 DirectByteBuffer buffer,
                 long offset)
          throws FMFileManagerException
Throws:
FMFileManagerException

read

public void read(java.io.RandomAccessFile raf,
                 DirectByteBuffer[] buffers,
                 long offset)
          throws FMFileManagerException
Specified by:
read in interface FMFileAccess
Throws:
FMFileManagerException

write

public void write(java.io.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

getFile

public FMFileImpl getFile()
Specified by:
getFile in interface FMFileAccess

getString

public java.lang.String getString()
Specified by:
getString in interface FMFileAccess