类 FilesController


  • public class FilesController
    extends java.lang.Object
    The wrapper class is to access the files module of the hive node.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void copyFile​(java.lang.String srcPath, java.lang.String destPath)
      Copy file from srcPath to destPath.
      void delete​(java.lang.String path)
      Delete the remote file.
      java.io.Reader getDownloadReader​(java.lang.String path)
      Get the download reader for downloading the content of the file.
      java.io.InputStream getDownloadStream​(java.lang.String path)
      Get the input stream for downloading the content of the file.
      java.lang.String getHash​(java.lang.String path)
      Get the hash code of the remote file content.
      FileInfo getProperty​(java.lang.String path)
      Get the details of the remote file.
      UploadStream getUploadStream​(java.lang.String path, boolean isPublic)
      Get the upload stream for uploading the content of the file.
      UploadWriter getUploadWriter​(java.lang.String path, boolean isPublic)
      Get the upload writer for uploading the content of the file.
      java.util.List<FileInfo> listChildren​(java.lang.String path)
      List the files on the remote folder.
      void moveFile​(java.lang.String srcPath, java.lang.String destPath)
      Move file from srcPath to destPath.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • FilesController

        public FilesController​(NodeRPCConnection connection)
        Create by the RPC connection.
        参数:
        connection - The RPC connection.
    • 方法详细资料

      • getUploadStream

        public UploadStream getUploadStream​(java.lang.String path,
                                            boolean isPublic)
                                     throws HiveException
        Get the upload stream for uploading the content of the file.
        参数:
        path - The uploading file path.
        isPublic - The uploading file is for public.
        返回:
        The output stream.
        抛出:
        HiveException - The error comes from the hive node.
      • getUploadWriter

        public UploadWriter getUploadWriter​(java.lang.String path,
                                            boolean isPublic)
                                     throws HiveException
        Get the upload writer for uploading the content of the file.
        参数:
        path - The uploading file path.
        isPublic - The uploading file is for public.
        返回:
        The writer.
        抛出:
        HiveException - The error comes from the hive node.
      • getDownloadStream

        public java.io.InputStream getDownloadStream​(java.lang.String path)
                                              throws HiveException
        Get the input stream for downloading the content of the file.
        参数:
        path - The download file path.
        返回:
        The input stream.
        抛出:
        HiveException - The error comes from the hive node.
      • getDownloadReader

        public java.io.Reader getDownloadReader​(java.lang.String path)
                                         throws HiveException
        Get the download reader for downloading the content of the file.
        参数:
        path - The download file path.
        返回:
        The reader.
        抛出:
        HiveException - The error comes from the hive node.
      • listChildren

        public java.util.List<FileInfo> listChildren​(java.lang.String path)
                                              throws HiveException
        List the files on the remote folder.
        参数:
        path - The path of the folder.
        返回:
        The info. of the file list.
        抛出:
        HiveException - The error comes from the hive node.
      • getProperty

        public FileInfo getProperty​(java.lang.String path)
                             throws HiveException
        Get the details of the remote file.
        参数:
        path - The path of the remote file.
        返回:
        The details of the remote file.
        抛出:
        HiveException - The error comes from the hive node.
      • getHash

        public java.lang.String getHash​(java.lang.String path)
                                 throws HiveException
        Get the hash code of the remote file content.
        参数:
        path - The path of the remote file.
        返回:
        The hash code.
        抛出:
        HiveException - The error comes from the hive node.
      • copyFile

        public void copyFile​(java.lang.String srcPath,
                             java.lang.String destPath)
                      throws HiveException
        Copy file from srcPath to destPath.
        参数:
        srcPath - The source path.
        destPath - The destination path.
        抛出:
        HiveException - The error comes from the hive node.
      • moveFile

        public void moveFile​(java.lang.String srcPath,
                             java.lang.String destPath)
                      throws HiveException
        Move file from srcPath to destPath.
        参数:
        srcPath - The source path.
        destPath - The destination path.
        抛出:
        HiveException - The error comes from the hive node.
      • delete

        public void delete​(java.lang.String path)
                    throws HiveException
        Delete the remote file.
        参数:
        path - The path of the file.
        抛出:
        HiveException - The error comes from the hive node.