Interface FMFile
-
- All Known Implementing Classes:
FMFileImpl
,FMFileLimited
,FMFilePadding
,FMFileTestImpl
,FMFileUnlimited
public interface FMFile
-
-
Field Summary
Fields Modifier and Type Field Description static int
FM_READ
static int
FM_WRITE
static int
FT_COMPACT
static int
FT_LINEAR
static int
FT_PIECE_REORDER
static int
FT_PIECE_REORDER_COMPACT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
FMFile
createClone()
void
delete()
void
ensureOpen(java.lang.String reason)
boolean
exists()
void
flush()
int
getAccessMode()
long
getLastModified()
long
getLength()
java.lang.String
getName()
FMFileOwner
getOwner()
int
getStorageType()
boolean
isClone()
boolean
isOpen()
void
moveFile(java.io.File new_file, FileUtil.ProgressListener pl)
void
read(DirectByteBuffer[] buffers, long offset)
void
read(DirectByteBuffer buffer, long offset)
void
renameFile(java.lang.String new_name)
void
setAccessMode(int mode)
void
setLength(long length)
void
setPieceComplete(int piece_number, DirectByteBuffer piece_data)
void
setStorageType(int type, boolean force)
void
write(DirectByteBuffer[] buffers, long position)
void
write(DirectByteBuffer buffer, long position)
-
-
-
Field Detail
-
FT_LINEAR
static final int FT_LINEAR
- See Also:
- Constant Field Values
-
FT_COMPACT
static final int FT_COMPACT
- See Also:
- Constant Field Values
-
FT_PIECE_REORDER
static final int FT_PIECE_REORDER
- See Also:
- Constant Field Values
-
FT_PIECE_REORDER_COMPACT
static final int FT_PIECE_REORDER_COMPACT
- See Also:
- Constant Field Values
-
FM_READ
static final int FM_READ
- See Also:
- Constant Field Values
-
FM_WRITE
static final int FM_WRITE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
java.lang.String getName()
-
exists
boolean exists()
-
getOwner
FMFileOwner getOwner()
-
moveFile
void moveFile(java.io.File new_file, FileUtil.ProgressListener pl) throws FMFileManagerException
- Throws:
FMFileManagerException
-
renameFile
void renameFile(java.lang.String new_name) throws FMFileManagerException
- Throws:
FMFileManagerException
-
setAccessMode
void setAccessMode(int mode) throws FMFileManagerException
- Throws:
FMFileManagerException
-
getAccessMode
int getAccessMode()
-
setStorageType
void setStorageType(int type, boolean force) throws FMFileManagerException
- Throws:
FMFileManagerException
-
getStorageType
int getStorageType()
-
ensureOpen
void ensureOpen(java.lang.String reason) throws FMFileManagerException
- Throws:
FMFileManagerException
-
getLength
long getLength() throws FMFileManagerException
- Throws:
FMFileManagerException
-
setLength
void setLength(long length) throws FMFileManagerException
- Throws:
FMFileManagerException
-
setPieceComplete
void setPieceComplete(int piece_number, DirectByteBuffer piece_data) throws FMFileManagerException
- Throws:
FMFileManagerException
-
read
void read(DirectByteBuffer buffer, long offset) throws FMFileManagerException
- Throws:
FMFileManagerException
-
read
void read(DirectByteBuffer[] buffers, long offset) throws FMFileManagerException
- Throws:
FMFileManagerException
-
write
void write(DirectByteBuffer buffer, long position) throws FMFileManagerException
- Throws:
FMFileManagerException
-
write
void write(DirectByteBuffer[] buffers, long position) throws FMFileManagerException
- Throws:
FMFileManagerException
-
flush
void flush() throws FMFileManagerException
- Throws:
FMFileManagerException
-
close
void close() throws FMFileManagerException
- Throws:
FMFileManagerException
-
isOpen
boolean isOpen()
-
delete
void delete() throws FMFileManagerException
- Throws:
FMFileManagerException
-
createClone
FMFile createClone() throws FMFileManagerException
- Throws:
FMFileManagerException
-
isClone
boolean isClone()
-
getLastModified
long getLastModified()
-
-