Interface FileListDataItemSource

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      void delete​(java.lang.String file)
      Deletes the specified file from the remote file system.
      void get​(java.lang.String localPath, java.lang.String remoteFile, int inRate, long offset, long size, int numDFEncoders, int blockSize, int unitSize, int mode)
      Downloads a file from the FC Server, and places it on the file system.
      int getMode()
      The current transfer mode of this client.
      int getStartRate()
      Returns the current start rate for FC transfers.
      int getUnitSize()
      Deprecated.
      Method deprecated.
      boolean isFileCatalystServer()
      Returns true if connected to a FileCatalyst server.
      boolean isForceFileOwnershipEnabled()
      Returns true if the force file ownership feature is currently enabled.
      FileListData list()
      Returns meta data for files in the current remote directory.
      default java.util.List<FileListDataItem> listAsList()
      a convenience method that returns list() as a basic java.util.List
      java.lang.String[] prms​(java.lang.String filename)
      Return the file permission of the file/directory listed in the argument from the remote server.
      void setFileFilter​(FileCatalystFileFilter<?> filter)
      Sets the FileFilter that is to be used by the implementation.
      void setForceFileOwnershipEnabled​(boolean isForceFileOwnershipEnabled)
      Sets whether or not the force file ownership feature is enabled.
      long size​(java.lang.String remoteFile)
      Return the size of a remote file
      default java.util.stream.Stream<FileListDataItem> streamWithInlineParse()
      Returns streaming meta data for files in the current remote directory.
      java.util.stream.Stream<FileListDataItem> streamWithInlineParse​(java.util.function.BooleanSupplier isCancelled)
      Returns streaming meta data for files in the current remote directory.
    • Method Detail

      • setFileFilter

        void setFileFilter​(FileCatalystFileFilter<?> filter)
                    throws java.io.IOException,
                           unlimited.core.util.common.exception.FCException
        Sets the FileFilter that is to be used by the implementation.
        Parameters:
        filter - Filter to set
        Throws:
        java.io.IOException
        unlimited.core.util.common.exception.FCException
      • isFileCatalystServer

        boolean isFileCatalystServer()
                              throws java.io.IOException,
                                     unlimited.core.util.common.exception.FCException
        Returns true if connected to a FileCatalyst server. Returns false if connected to a standard FTP server.
        Returns:
        true if connected to a FileCatalyst server.
        Throws:
        java.io.IOException
        unlimited.core.util.common.exception.FCException
      • streamWithInlineParse

        default java.util.stream.Stream<FileListDataItem> streamWithInlineParse()
                                                                         throws unlimited.core.util.common.exception.FCException,
                                                                                java.io.IOException
        Returns streaming meta data for files in the current remote directory. Use if you expect a large collection of files to be returned from the Server
        Returns:
        stream of FileListDataItems
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
        StreamClosedException - If the stream gets closed during operations
      • streamWithInlineParse

        java.util.stream.Stream<FileListDataItem> streamWithInlineParse​(java.util.function.BooleanSupplier isCancelled)
                                                                 throws unlimited.core.util.common.exception.FCException,
                                                                        java.io.IOException
        Returns streaming meta data for files in the current remote directory. Use if you expect a large collection of files to be returned from the Server
        Parameters:
        isCancelled - cancel handler to stop stream on cancel
        Returns:
        stream of FileListDataItems
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
        StreamClosedException - If the stream gets closed during operations
      • list

        FileListData list()
                   throws unlimited.core.util.common.exception.FCException,
                          java.io.IOException
        Returns meta data for files in the current remote directory. Use to see what files exist and can be downloaded from the connected Server
        Returns:
        meta data for files in the current remote directory.
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • listAsList

        default java.util.List<FileListDataItem> listAsList()
                                                     throws unlimited.core.util.common.exception.FCException,
                                                            java.io.IOException
        a convenience method that returns list() as a basic java.util.List
        Returns:
        meta data for files in the current remote directory
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • prms

        java.lang.String[] prms​(java.lang.String filename)
                         throws unlimited.core.util.common.exception.FCException,
                                java.io.IOException
        Return the file permission of the file/directory listed in the argument from the remote server.
        Parameters:
        fileName - name of the file
        Returns:
        permissions
        Throws:
        unlimited.core.util.common.exception.FCException
        java.io.IOException
      • isForceFileOwnershipEnabled

        boolean isForceFileOwnershipEnabled()
        Returns true if the force file ownership feature is currently enabled. If it is, then all files downloaded this client will have their ownership changed to current values for the ForceFileOwnershipUsername, and ForceFileOwnershipGroupname
        Returns:
        the isForceFileOwnershipEnabled
      • setForceFileOwnershipEnabled

        void setForceFileOwnershipEnabled​(boolean isForceFileOwnershipEnabled)
        Sets whether or not the force file ownership feature is enabled. If it is, then all files downloaded this client will have their ownership changed to current values for the ForceFileOwnershipUsername, and ForceFileOwnershipGroupname
        Parameters:
        isForceFileOwnershipEnabled - the isForceFileOwnershipEnabled to set
      • size

        long size​(java.lang.String remoteFile)
           throws unlimited.core.util.common.exception.FCException,
                  java.io.IOException
        Return the size of a remote file
        Parameters:
        remoteFile - String The path to the remote file
        Returns:
        long the size of the remote file or -1 if it doesn't exist
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • getStartRate

        int getStartRate()
        Returns the current start rate for FC transfers. All FC transfer will begin at this rate and ramp up to the specified target rate if no congestion is encounters.

        Note: Congestion control must be enabled for this value to have an effect.

        Returns:
        The current start rate for FC transfers in Kilobits per second
      • getUnitSize

        @Deprecated
        int getUnitSize()
        Deprecated.
        Method deprecated. Use getPacketSize() instead
        Use getPacketSize
        Returns:
        The current unit size. In Bytes.
      • get

        void get​(java.lang.String localPath,
                 java.lang.String remoteFile,
                 int inRate,
                 long offset,
                 long size,
                 int numDFEncoders,
                 int blockSize,
                 int unitSize,
                 int mode)
          throws java.io.IOException,
                 unlimited.core.util.common.exception.FCException,
                 java.security.NoSuchAlgorithmException,
                 unlimited.core.util.common.exception.FCException,
                 java.io.IOException
        Downloads a file from the FC Server, and places it on the file system.
        Parameters:
        localPath - Location of where to store the file after it has been downloaded
        remoteFile - Remote file to be downloaded from the Server
        inRate - Rate to use for the download transfer
        offset - Location in the local file to start placing downloaded data into (0 = start of file)
        size - Amount of date to retrieve from the FC Server. (Typically this is (remote file size - (offset))
        numDFEncoders - Number of encoders to use for the
        blockSize - Size of blocks to be used in the download transfer
        unitSize - Size of the individual units in the download transfer. Value with compared with the Server's max unit size. Minimum of the two values will be used
        mode - Transfer mode to be used for the download. Available modes can be at TransferMode
        Throws:
        java.io.IOException
        unlimited.core.util.common.exception.FCException
        java.security.NoSuchAlgorithmException
        unlimited.core.util.common.exception.FCException
        java.io.IOException
      • delete

        void delete​(java.lang.String file)
             throws unlimited.core.util.common.exception.FCException,
                    java.io.IOException
        Deletes the specified file from the remote file system.
        Parameters:
        file - The file to be deleted
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs