com.aelitis.azureus.core.diskmanager.file.impl
Class FMFileImpl
java.lang.Object
com.aelitis.azureus.core.diskmanager.file.impl.FMFileImpl
- All Implemented Interfaces:
- FMFile
- Direct Known Subclasses:
- FMFileLimited, FMFileUnlimited
public abstract class FMFileImpl
- extends Object
- implements FMFile
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
READ_ACCESS_MODE
protected static final String READ_ACCESS_MODE
- See Also:
- Constant Field Values
WRITE_ACCESS_MODE
protected static final String WRITE_ACCESS_MODE
- See Also:
- Constant Field Values
this_mon
protected final AEMonitor this_mon
FMFileImpl
protected FMFileImpl(FMFileOwner _owner,
FMFileManagerImpl _manager,
File _file,
int _type)
throws FMFileManagerException
- Throws:
FMFileManagerException
FMFileImpl
protected FMFileImpl(FMFileImpl basis)
throws FMFileManagerException
- Throws:
FMFileManagerException
getManager
protected FMFileManagerImpl getManager()
getName
public String getName()
- Specified by:
getName
in interface FMFile
exists
public boolean exists()
- Specified by:
exists
in interface FMFile
getOwner
public FMFileOwner getOwner()
- Specified by:
getOwner
in interface FMFile
isClone
public boolean isClone()
- Specified by:
isClone
in interface FMFile
setStorageType
public void setStorageType(int new_type)
throws FMFileManagerException
- Specified by:
setStorageType
in interface FMFile
- Throws:
FMFileManagerException
getStorageType
public int getStorageType()
- Specified by:
getStorageType
in interface FMFile
getAccessMode
public int getAccessMode()
- Specified by:
getAccessMode
in interface FMFile
setAccessModeSupport
protected void setAccessModeSupport(int mode)
getLinkedFile
protected File getLinkedFile()
moveFile
public void moveFile(File new_unlinked_file)
throws FMFileManagerException
- Specified by:
moveFile
in interface FMFile
- Throws:
FMFileManagerException
renameFile
public void renameFile(String new_name)
throws FMFileManagerException
- Specified by:
renameFile
in interface FMFile
- Throws:
FMFileManagerException
ensureOpen
public void ensureOpen(String reason)
throws FMFileManagerException
- Specified by:
ensureOpen
in interface FMFile
- Throws:
FMFileManagerException
getLengthSupport
protected long getLengthSupport()
throws FMFileManagerException
- Throws:
FMFileManagerException
setLengthSupport
protected void setLengthSupport(long length)
throws FMFileManagerException
- Throws:
FMFileManagerException
reopen
protected void reopen(FMFileManagerException cause)
throws Throwable
- Throws:
Throwable
openSupport
protected void openSupport(String reason)
throws FMFileManagerException
- Throws:
FMFileManagerException
closeSupport
protected void closeSupport(boolean explicit)
throws FMFileManagerException
- Throws:
FMFileManagerException
flush
public void flush()
throws FMFileManagerException
- Specified by:
flush
in interface FMFile
- Throws:
FMFileManagerException
isPieceCompleteProcessingNeeded
protected boolean isPieceCompleteProcessingNeeded(int piece_number)
throws FMFileManagerException
- Throws:
FMFileManagerException
setPieceCompleteSupport
protected void setPieceCompleteSupport(int piece_number,
DirectByteBuffer piece_data)
throws FMFileManagerException
- Throws:
FMFileManagerException
delete
public void delete()
throws FMFileManagerException
- Specified by:
delete
in interface FMFile
- Throws:
FMFileManagerException
readSupport
protected void readSupport(DirectByteBuffer buffer,
long position)
throws FMFileManagerException
- Throws:
FMFileManagerException
readSupport
protected void readSupport(DirectByteBuffer[] buffers,
long position)
throws FMFileManagerException
- Throws:
FMFileManagerException
writeSupport
protected void writeSupport(DirectByteBuffer buffer,
long position)
throws FMFileManagerException
- Throws:
FMFileManagerException
writeSupport
protected void writeSupport(DirectByteBuffer[] buffers,
long position)
throws FMFileManagerException
- Throws:
FMFileManagerException
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interface FMFile
createDirs
protected void createDirs(File target)
throws FMFileManagerException
- Throws:
FMFileManagerException
deleteDirs
protected void deleteDirs()
getString
protected String getString()
generateEvidence
protected static void generateEvidence(IndentWriter writer)