package nxm.sys.lib;

import java.io.InputStream;
import java.io.OutputStream;

import nxm.sys.inc.InternalUseOnly;

/** ****** COMMONS-NET independent version **********************
    Empty FtpResource for when needed and user wants to avoid old commons-net jar dependency

    @author Zachary Matthews
    @since NeXtMidas 4.1.3
 */
public class FtpResource extends SocketResource {

  // Is this the empty version of FtpResource?
  private static final boolean isEmptyVersion = true;

  /** default constructor */
  public FtpResource () {
    Shell.getMidasContext().warning("FtpResource has been disabled since its dependency has been removed - run adjust-jar-dependencies.sh FTP to restore full Class");
  }

  public void setURL (String str) {
    Shell.getMidasContext().warning("FtpResource disabled, dependency has been removed");
  }

  public boolean open () {
    Shell.getMidasContext().warning("FtpResource disabled, dependency has been removed");
    return false;
  }

  public boolean close () {
    Shell.getMidasContext().warning("FtpResource disabled, dependency has been removed");
    return false;
  }

  /** Internal call to open input stream. */
  protected InputStream getInputStream (boolean indefinite)  {
    return null;
  }

  /** Internal call to open output stream. */
  protected OutputStream getOutputStream (boolean indefinite) {
    return null;
  }

  /** Is this the empty version of FtpResource?
   *
   *  @return true if using the empty version of FtpResource, false otherwise
   *  @since NeXtMidas 4.1.4
   */
  @InternalUseOnly
  public static boolean getIsEmptyVersion () {
    return isEmptyVersion;
  }
}
