
public interface FileInterface
| Modifier and Type | Method and Description |
|---|---|
boolean |
abortFile()
Try to abort the current transfer if any
|
boolean |
canRead() |
boolean |
canWrite() |
void |
checkIdentify()
Check if the authentication is correct
|
void |
clear()
Set empty this FtpFile, mark it unReady.
|
boolean |
closeFile()
Close the current FileInterface
|
boolean |
delete()
Delete the current FileInterface.
|
boolean |
exists() |
DirInterface |
getDir() |
String |
getFile() |
DataBlock |
getMarker()
Create a restart from context for the current FileInterface
|
SessionInterface |
getSession() |
boolean |
isDirectory()
Is the current FileInterface a directory and exists
|
boolean |
isFile()
Is the current FileInterface a file and exists
|
boolean |
isInReading() |
boolean |
isInWriting() |
long |
length() |
DataBlock |
readDataBlock()
Read a new block for FileInterface
|
DataBlock |
readDataBlock(byte[] buffer)
Read a new block for FileInterface
|
boolean |
renameTo(String path)
Rename the current FileInterface into a new filename from argument
|
boolean |
restartMarker(Restart restart)
Restart from a Marker for the current FileInterface if any.
|
boolean |
retrieve()
Ask to retrieve the current FileInterface.
|
void |
setPosition(long position)
Change the position in the file.
|
boolean |
store()
Ask to store the current FileInterface.
|
void |
writeDataBlock(DataBlock dataBlock)
Function called by the DataNetworkHandler when it receives one DataBlock
(Store like command)
|
void clear()
throws CommandAbstractException
CommandAbstractExceptionvoid checkIdentify()
throws Reply530Exception
Reply530ExceptionSessionInterface getSession()
DirInterface getDir()
boolean isDirectory()
throws CommandAbstractException
CommandAbstractExceptionboolean isFile()
throws CommandAbstractException
CommandAbstractExceptionString getFile() throws CommandAbstractException
CommandAbstractExceptionboolean closeFile()
throws CommandAbstractException
CommandAbstractExceptionlong length()
throws CommandAbstractException
CommandAbstractExceptionboolean isInWriting()
throws CommandAbstractException
CommandAbstractExceptionboolean isInReading()
throws CommandAbstractException
CommandAbstractExceptionboolean canRead()
throws CommandAbstractException
CommandAbstractExceptionboolean canWrite()
throws CommandAbstractException
CommandAbstractExceptionboolean exists()
throws CommandAbstractException
CommandAbstractExceptionboolean abortFile()
throws CommandAbstractException
CommandAbstractExceptionboolean store()
throws CommandAbstractException
CommandAbstractExceptionboolean retrieve()
throws CommandAbstractException
CommandAbstractExceptionboolean renameTo(String path) throws CommandAbstractException
path - the new filename (path could be relative or absolute
-
without mount point)CommandAbstractExceptionboolean restartMarker(Restart restart) throws CommandAbstractException
restart - CommandAbstractExceptionDataBlock getMarker() throws CommandAbstractException
CommandAbstractExceptionboolean delete()
throws CommandAbstractException
CommandAbstractExceptionvoid setPosition(long position)
throws IOException
position - the position to setIOExceptionvoid writeDataBlock(DataBlock dataBlock) throws FileTransferException
dataBlock - FileTransferExceptionFileEndOfTransferExceptionDataBlock readDataBlock() throws FileEndOfTransferException, FileTransferException
FileEndOfTransferExceptionFileTransferExceptionDataBlock readDataBlock(byte[] buffer) throws FileEndOfTransferException, FileTransferException
buffer - use the given buffer to readFileEndOfTransferExceptionFileTransferExceptionCopyright © 2009–2022 Waarp. All rights reserved.