Class WebDavModule
java.lang.Object
ecmwf.common.ectrans.TransferModule
ecmwf.common.ectrans.module.WebDavModule
- All Implemented Interfaces:
Closeable, AutoCloseable
WebDAV transfer module.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidconnect(String location, ECtransSetup setup) Connect.voidDelete by name.Gets the input stream to read the file given by name starting at posn.intgetPort(ECtransSetup setup) Gets the port from the setup.voidlist(String directory, String pattern, OutputStream out) Default implementation to write the list to the provided output stream.String[]listAsStringArray(String directory, String pattern) List as a string array.voidMake directory by name.voidMove source to target.booleanput(InputStream in, String name, long posn, long size) Write the content of the file given by its name, starting at position posn and writing to the provided input stream.Provide an output stream to write the content of the file given by its name starting at position posn.voidRemove directory by name.longGive the size of the file given by its name.voidForce an update of the statistics from the underlying socket.Methods inherited from class TransferModule
check, containsAttribute, copy, delegateChecksum, get, getAttribute, getAttribute, getAvailable, getClearPassword, getClosedOnError, getCookie, getDebug, getECtransDestination, getECtransModule, getECUser, getMSUser, getRemoteProvider, getStatus, listAsByteArray, preGet, prePut, setAttribute, setAttribute, setAvailable, setClosedOnError, setDebug, setInputFilter, setInputMd5, setInputSize, setOutputFilter
-
Constructor Details
-
WebDavModule
public WebDavModule()
-
-
Method Details
-
updateSocketStatistics
Description copied from class:TransferModuleForce an update of the statistics from the underlying socket.- Overrides:
updateSocketStatisticsin classTransferModule- Throws:
IOException- Signals that an I/O exception has occurred.
-
connect
Description copied from class:TransferModuleConnect.- Specified by:
connectin classTransferModule- Parameters:
location- the locationsetup- the setup- Throws:
IOException
-
getPort
Description copied from class:TransferModuleGets the port from the setup.- Overrides:
getPortin classTransferModule- Parameters:
setup- the setup- Returns:
- the port
-
del
Description copied from class:TransferModuleDelete by name.- Specified by:
delin classTransferModule- Parameters:
name- the name- Throws:
IOException- Signals that an I/O exception has occurred.
-
get
Description copied from class:TransferModuleGets the input stream to read the file given by name starting at posn.- Specified by:
getin classTransferModule- Parameters:
name- the nameposn- the posn- Returns:
- the input stream
- Throws:
IOException- Signals that an I/O exception has occurred.
-
put
Description copied from class:TransferModuleWrite the content of the file given by its name, starting at position posn and writing to the provided input stream. By default, doing nothing and returning false.- Overrides:
putin classTransferModule- Parameters:
in- the inname- the nameposn- the posnsize- the size- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.
-
put
Description copied from class:TransferModuleProvide an output stream to write the content of the file given by its name starting at position posn.- Specified by:
putin classTransferModule- Parameters:
name- the nameposn- the posnsize- the size- Returns:
- the output stream
- Throws:
IOException- Signals that an I/O exception has occurred.
-
size
Description copied from class:TransferModuleGive the size of the file given by its name.- Specified by:
sizein classTransferModule- Parameters:
name- the name- Returns:
- the long
- Throws:
IOException- Signals that an I/O exception has occurred.
-
mkdir
Description copied from class:TransferModuleMake directory by name.- Overrides:
mkdirin classTransferModule- Parameters:
dir- the dir- Throws:
IOException- Signals that an I/O exception has occurred.
-
rmdir
Description copied from class:TransferModuleRemove directory by name.- Overrides:
rmdirin classTransferModule- Parameters:
dir- the dir- Throws:
IOException- Signals that an I/O exception has occurred.
-
move
Description copied from class:TransferModuleMove source to target.- Overrides:
movein classTransferModule- Parameters:
source- the sourcetarget- the target- Throws:
IOException- Signals that an I/O exception has occurred.
-
list
Description copied from class:TransferModuleDefault implementation to write the list to the provided output stream. The implementation should give a better implementation as this one is relying on the non optimal listAsStringArray method by default.- Overrides:
listin classTransferModule- Parameters:
directory- the directorypattern- the patternout- the out- Throws:
IOException- Signals that an I/O exception has occurred.
-
listAsStringArray
Description copied from class:TransferModuleList as a string array.- Overrides:
listAsStringArrayin classTransferModule- Parameters:
directory- the directorypattern- the pattern- Returns:
- the string[]
- Throws:
IOException- Signals that an I/O exception has occurred.
-
close
- Throws:
IOException
-