Class FtpObject

  • All Implemented Interfaces:
    java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable, org.mozilla.javascript.SymbolScriptable

    public class FtpObject
    extends org.mozilla.javascript.ScriptableObject
    A FTP-client object that allows to do some FTP from HOP applications. FTP support is far from complete but can easily be extended if more functionality is needed. This uses the NetComponent classes from savarese.org (ex oroinc.com).
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject

        org.mozilla.javascript.ScriptableObject.KeyComparator
    • Field Summary

      • Fields inherited from class org.mozilla.javascript.ScriptableObject

        CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
      • Fields inherited from interface org.mozilla.javascript.Scriptable

        NOT_FOUND
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean ascii()  
      boolean binary()  
      boolean cd​(java.lang.String path)  
      static FtpObject ftpObjCtor​(org.mozilla.javascript.Context cx, java.lang.Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr)  
      java.lang.String getClassName()  
      boolean getFile​(java.lang.String remoteFile, java.lang.String localFile)  
      java.lang.Object getString​(java.lang.String remoteFile)  
      static void init​(org.mozilla.javascript.Scriptable scope)  
      boolean lcd​(java.lang.String dir)  
      boolean login​(java.lang.String username, java.lang.String password)
      Login to the FTP server
      boolean logout()
      Disconnect from FTP server
      boolean mkdir​(java.lang.String dir)  
      boolean putFile​(java.lang.String localFile, java.lang.String remoteFile)  
      boolean putString​(java.lang.Object obj, java.lang.String remoteFile)  
      java.lang.String toDetailString()  
      java.lang.String toString()  
      • Methods inherited from class org.mozilla.javascript.ScriptableObject

        applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getClassName

        public java.lang.String getClassName()
        Specified by:
        getClassName in interface org.mozilla.javascript.Scriptable
        Specified by:
        getClassName in class org.mozilla.javascript.ScriptableObject
        Returns:
        ...
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        ...
      • toDetailString

        public java.lang.String toDetailString()
        Returns:
        ...
      • login

        public boolean login​(java.lang.String username,
                             java.lang.String password)
        Login to the FTP server
        Parameters:
        username - the user name
        password - the user's password
        Returns:
        true if successful, false otherwise
      • cd

        public boolean cd​(java.lang.String path)
      • mkdir

        public boolean mkdir​(java.lang.String dir)
      • lcd

        public boolean lcd​(java.lang.String dir)
      • putFile

        public boolean putFile​(java.lang.String localFile,
                               java.lang.String remoteFile)
      • putString

        public boolean putString​(java.lang.Object obj,
                                 java.lang.String remoteFile)
      • getFile

        public boolean getFile​(java.lang.String remoteFile,
                               java.lang.String localFile)
      • getString

        public java.lang.Object getString​(java.lang.String remoteFile)
      • logout

        public boolean logout()
        Disconnect from FTP server
        Returns:
        true if successful, false otherwise
      • binary

        public boolean binary()
      • ascii

        public boolean ascii()
      • ftpObjCtor

        public static FtpObject ftpObjCtor​(org.mozilla.javascript.Context cx,
                                           java.lang.Object[] args,
                                           org.mozilla.javascript.Function ctorObj,
                                           boolean inNewExpr)
      • init

        public static void init​(org.mozilla.javascript.Scriptable scope)