Class WebDavModule

java.lang.Object
ecmwf.common.ectrans.TransferModule
ecmwf.common.ectrans.module.WebDavModule
All Implemented Interfaces:
Closeable, AutoCloseable

public final class WebDavModule extends TransferModule
WebDAV transfer module.
  • Constructor Details

    • WebDavModule

      public WebDavModule()
  • Method Details

    • updateSocketStatistics

      public void updateSocketStatistics() throws IOException
      Description copied from class: TransferModule
      Force an update of the statistics from the underlying socket.
      Overrides:
      updateSocketStatistics in class TransferModule
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • connect

      public void connect(String location, ECtransSetup setup) throws IOException
      Description copied from class: TransferModule
      Connect.
      Specified by:
      connect in class TransferModule
      Parameters:
      location - the location
      setup - the setup
      Throws:
      IOException
    • getPort

      public int getPort(ECtransSetup setup)
      Description copied from class: TransferModule
      Gets the port from the setup.
      Overrides:
      getPort in class TransferModule
      Parameters:
      setup - the setup
      Returns:
      the port
    • del

      public void del(String name) throws IOException
      Description copied from class: TransferModule
      Delete by name.
      Specified by:
      del in class TransferModule
      Parameters:
      name - the name
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • get

      public InputStream get(String name, long posn) throws IOException
      Description copied from class: TransferModule
      Gets the input stream to read the file given by name starting at posn.
      Specified by:
      get in class TransferModule
      Parameters:
      name - the name
      posn - the posn
      Returns:
      the input stream
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • put

      public boolean put(InputStream in, String name, long posn, long size) throws IOException
      Description copied from class: TransferModule
      Write 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:
      put in class TransferModule
      Parameters:
      in - the in
      name - the name
      posn - the posn
      size - the size
      Returns:
      true, if successful
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • put

      public OutputStream put(String name, long posn, long size) throws IOException
      Description copied from class: TransferModule
      Provide an output stream to write the content of the file given by its name starting at position posn.
      Specified by:
      put in class TransferModule
      Parameters:
      name - the name
      posn - the posn
      size - the size
      Returns:
      the output stream
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • size

      public long size(String name) throws IOException
      Description copied from class: TransferModule
      Give the size of the file given by its name.
      Specified by:
      size in class TransferModule
      Parameters:
      name - the name
      Returns:
      the long
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • mkdir

      public void mkdir(String dir) throws IOException
      Description copied from class: TransferModule
      Make directory by name.
      Overrides:
      mkdir in class TransferModule
      Parameters:
      dir - the dir
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • rmdir

      public void rmdir(String dir) throws IOException
      Description copied from class: TransferModule
      Remove directory by name.
      Overrides:
      rmdir in class TransferModule
      Parameters:
      dir - the dir
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • move

      public void move(String source, String target) throws IOException
      Description copied from class: TransferModule
      Move source to target.
      Overrides:
      move in class TransferModule
      Parameters:
      source - the source
      target - the target
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • list

      public void list(String directory, String pattern, OutputStream out) throws IOException
      Description copied from class: TransferModule
      Default 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:
      list in class TransferModule
      Parameters:
      directory - the directory
      pattern - the pattern
      out - the out
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • listAsStringArray

      public String[] listAsStringArray(String directory, String pattern) throws IOException
      Description copied from class: TransferModule
      List as a string array.
      Overrides:
      listAsStringArray in class TransferModule
      Parameters:
      directory - the directory
      pattern - the pattern
      Returns:
      the string[]
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • close

      public void close() throws IOException
      Throws:
      IOException