Class TestModule

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

public final class TestModule extends TransferModule
The Class TestModule.
  • Constructor Details

    • TestModule

      public TestModule()
  • Method Details

    • getStatus

      public String getStatus()
      Gets the current status of the transfer module. Gets the status.
      Overrides:
      getStatus in class TransferModule
      Returns:
      the status
    • connect

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

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

      public OutputStream put(String name, long posn, long size) throws IOException
      Provide an output stream to write the content of the file given by its name starting at position posn. Put.
      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.
    • copy

      public void copy(String source, String target, long posn, long size) throws IOException
      Copy the source file to the target file, starting at position posn and writing size bytes. Copy.
      Overrides:
      copy in class TransferModule
      Parameters:
      source - the source
      target - the target
      posn - the posn
      size - the size
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • get

      public InputStream get(String name, long posn) throws IOException
      Gets the input stream to read the file given by name starting at posn. Gets the.
      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.
    • size

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

      public void close() throws IOException
      Close.
      Throws:
      IOException