public class FileClientImpl extends java.lang.Object implements FileClient
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
FILE_ID_FIELD |
static java.lang.String |
FILE_OBJECT_KEY_FIELD |
static java.lang.String |
FILE_URL_FIELD |
DEFAULT_BUFFER_SIZE, STORAGE_DEFAULT, STORAGE_FS| 构造器和说明 |
|---|
FileClientImpl(java.net.URI endpoint,
org.apache.http.impl.client.CloseableHttpClient httpClient,
com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
FileClientImpl(java.net.URI endpoint,
org.apache.http.impl.client.CloseableHttpClient httpClient,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
java.lang.String basePath,
java.lang.String openApiContextPath) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
copy(java.lang.String fileId,
java.io.OutputStream outputStream)
复制到本地输出。
|
void |
copy(java.lang.String fileId,
java.nio.file.Path destination)
复制到本地文件。
|
void |
copy(java.net.URI uri,
java.io.OutputStream outputStream) |
void |
copy(java.net.URI uri,
java.nio.file.Path destination) |
ExsCodec |
getCodec() |
ExsMessage |
getFile(java.lang.String fileId)
获取文件及附加信息。
|
protected <T> T |
getFile(java.lang.String fileId,
org.opoo.ootp.client.impl.FileClientImpl.ResponseHandler<T> responseHandler) |
java.io.InputStream |
getStream(java.lang.String fileId)
下载文件。
|
java.io.InputStream |
getStream(java.net.URI uri)
获取 URI 对应的文件的输入流,如果远程文件是解密的,这里是解密后的输入流。
|
ExsMessage |
getUri(java.net.URI uri)
获取 URI 对应的文件的文件信息,如果远程文件是解密的,这里是解密后的文件信息。
|
protected <T> T |
getUri(java.net.URI uri,
org.opoo.ootp.client.impl.FileClientImpl.ResponseHandler<T> responseHandler) |
FileInfo |
put(ExsMessage message,
java.lang.String storage,
java.lang.String pathInfo)
上传文件。
|
void |
setCodec(ExsCodec codec) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopy, copy, copy, upload, upload, upload, upload, upload, upload, upload, upload, upload, upload, uploadToCustomStorage, uploadToCustomStorage, uploadToCustomStorage, uploadToCustomStorage, uploadToDefaultStorage, uploadToDefaultStorage, uploadToDefaultStorage, uploadToDefaultStorage, uploadToFsStorage, uploadToFsStorage, uploadToFsStorage, uploadToFsStoragepublic static final java.lang.String FILE_ID_FIELD
public static final java.lang.String FILE_URL_FIELD
public static final java.lang.String FILE_OBJECT_KEY_FIELD
public FileClientImpl(java.net.URI endpoint,
org.apache.http.impl.client.CloseableHttpClient httpClient,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
java.lang.String basePath,
java.lang.String openApiContextPath)
public FileClientImpl(java.net.URI endpoint,
org.apache.http.impl.client.CloseableHttpClient httpClient,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public ExsCodec getCodec()
public void setCodec(ExsCodec codec)
public FileInfo put(ExsMessage message, java.lang.String storage, java.lang.String pathInfo) throws java.io.IOException, OotpException
FileClientput 在接口中 FileClientmessage - 文件消息storage - 存储器名称pathInfo - 后置处理路径java.io.IOException - 文件处理异常OotpException - 通常是 Http 请求异常,或者服务器返回错误消息protected <T> T getFile(java.lang.String fileId,
org.opoo.ootp.client.impl.FileClientImpl.ResponseHandler<T> responseHandler)
throws java.io.IOException
java.io.IOExceptionpublic ExsMessage getFile(java.lang.String fileId) throws java.io.IOException
FileClientgetFile 在接口中 FileClientfileId - 文件IDjava.io.IOException - 文件处理异常public java.io.InputStream getStream(java.lang.String fileId)
throws java.io.IOException
FileClientgetStream 在接口中 FileClientfileId - 文件IDjava.io.IOException - 文件处理异常public void copy(java.lang.String fileId,
java.nio.file.Path destination)
throws java.io.IOException
FileClientcopy 在接口中 FileClientfileId - 文件IDdestination - 本地文件java.io.IOException - io 异常public void copy(java.lang.String fileId,
java.io.OutputStream outputStream)
throws java.io.IOException
FileClientcopy 在接口中 FileClientfileId - 文件IDoutputStream - 输出流java.io.IOException - io 异常protected <T> T getUri(java.net.URI uri,
org.opoo.ootp.client.impl.FileClientImpl.ResponseHandler<T> responseHandler)
throws java.io.IOException
java.io.IOExceptionpublic ExsMessage getUri(java.net.URI uri) throws java.io.IOException
FileClientgetUri 在接口中 FileClienturi - 远程文件资源地址。一般是预签名的S3对象的URI地址。java.io.IOException - io 异常public java.io.InputStream getStream(java.net.URI uri)
throws java.io.IOException
FileClientgetStream 在接口中 FileClienturi - 远程文件资源地址。一般是预签名的S3对象的URI地址。java.io.IOException - io 异常public void copy(java.net.URI uri,
java.io.OutputStream outputStream)
throws java.io.IOException
copy 在接口中 FileClientjava.io.IOExceptionpublic void copy(java.net.URI uri,
java.nio.file.Path destination)
throws java.io.IOException
copy 在接口中 FileClientjava.io.IOExceptionCopyright © 2024. All rights reserved.