public class FTPUploadFileFactory
extends java.lang.Object
FTPUploadFile 工厂类
由于这个上传文件的这个实体类存在很多默认值,所以制造一个默认工厂类
FTPUploadFile factory
You should instance a FTPUploadFile by this factory
Email: fishinlove@163.com
created by 2019/04/02 21:12:32
FTPUploadFile| 构造器和说明 |
|---|
FTPUploadFileFactory() |
| 限定符和类型 | 方法和说明 |
|---|---|
static FTPUploadFile |
make(int fileType,
java.lang.String remoteDirection,
java.lang.String remoteFileName,
java.io.InputStream inputStream)
生成一个待上传文件
Create a file to be uploaded
|
static FTPUploadFile |
makeAsciiFile(java.lang.String remoteDirection,
java.lang.String remoteFileName,
java.io.InputStream inputStream)
生成一个待上传文本文件
Create a text file to be uploaded
|
static FTPUploadFile |
makeBinaryFile(java.lang.String remoteDirection,
java.lang.String remoteFileName,
java.io.InputStream inputStream)
生成一个待上传二进制文件
Create a binary file to be uploaded
|
public static FTPUploadFile makeBinaryFile(java.lang.String remoteDirection, java.lang.String remoteFileName, java.io.InputStream inputStream)
生成一个待上传二进制文件
Create a binary file to be uploaded
remoteDirection - 文件保存在 FTP 服务器的那个文件
The direction where the file will be saved
remoteFileName - 文件保存的名字
The name of file in the FTP server
inputStream - 文件输入流
File inputStream
返回一个待上传二进制文件对象
Return a binary file to be uploaded
public static FTPUploadFile makeAsciiFile(java.lang.String remoteDirection, java.lang.String remoteFileName, java.io.InputStream inputStream)
生成一个待上传文本文件
Create a text file to be uploaded
remoteDirection - 文件保存在 FTP 服务器的那个文件
The direction where the file will be saved
remoteFileName - 文件保存的名字
The name of file in the FTP server
inputStream - 文件输入流
File inputStream
返回一个待上传文本文件对象
Return a text file to be uploaded
public static FTPUploadFile make(int fileType, java.lang.String remoteDirection, java.lang.String remoteFileName, java.io.InputStream inputStream)
生成一个待上传文件
Create a file to be uploaded
fileType - 文件类型
File type
remoteDirection - 文件保存在 FTP 服务器的那个文件
The direction where the file will be saved
remoteFileName - 文件保存的名字
The name of file in the FTP server
inputStream - 文件输入流
File inputStream
返回一个待上传文件对象
Return a file to be uploaded
FTPClient.setFileType(int),
FTP.ASCII_FILE_TYPE,
FTP.BINARY_FILE_TYPECopyright © 2019. All Rights Reserved.