Class DataSocket

java.lang.Object
ecmwf.common.ftp.DataSocket
All Implemented Interfaces:
Closeable, AutoCloseable

public final class DataSocket extends Object implements Closeable
The Class DataSocket.
  • Constructor Details

    • DataSocket

      public DataSocket(Socket socket, boolean dataAlive)
      Instantiates a new data socket.
      Parameters:
      socket - the socket
      dataAlive - the data alive
  • Method Details

    • getInputStream

      public InputStream getInputStream() throws IOException
      Gets the input stream.
      Returns:
      the input stream
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getOutputStream

      public OutputStream getOutputStream(long size) throws IOException
      Gets the output stream.
      Parameters:
      size - the size
      Returns:
      the output stream
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • close

      public void close() throws IOException
      Close.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • close

      public void close(boolean force) throws IOException
      Close.
      Parameters:
      force - the force
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • finalize

      protected void finalize() throws Throwable
      Finalize.
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • isOpen

      public boolean isOpen()
      Checks if is open.
      Returns:
      true, if is open
    • toString

      public String toString()
      To string.
      Overrides:
      toString in class Object