类 FilesController
- java.lang.Object
-
- org.elastos.hive.vault.files.FilesController
-
public class FilesController extends java.lang.ObjectThe wrapper class is to access the files module of the hive node.
-
-
构造器概要
构造器 构造器 说明 FilesController(NodeRPCConnection connection)Create by the RPC connection.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidcopyFile(java.lang.String srcPath, java.lang.String destPath)Copy file from srcPath to destPath.voiddelete(java.lang.String path)Delete the remote file.java.io.ReadergetDownloadReader(java.lang.String path)Get the download reader for downloading the content of the file.java.io.InputStreamgetDownloadStream(java.lang.String path)Get the input stream for downloading the content of the file.java.lang.StringgetHash(java.lang.String path)Get the hash code of the remote file content.FileInfogetProperty(java.lang.String path)Get the details of the remote file.UploadStreamgetUploadStream(java.lang.String path, boolean isPublic)Get the upload stream for uploading the content of the file.UploadWritergetUploadWriter(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.voidmoveFile(java.lang.String srcPath, java.lang.String destPath)Move file from srcPath to destPath.
-
-
-
构造器详细资料
-
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 HiveExceptionGet 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 HiveExceptionGet 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 HiveExceptionGet 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 HiveExceptionCopy 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 HiveExceptionMove 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 HiveExceptionDelete the remote file.- 参数:
path- The path of the file.- 抛出:
HiveException- The error comes from the hive node.
-
-