Package org.bremersee.data.minio
Class MinioMultipartFileImpl
- java.lang.Object
-
- org.bremersee.data.minio.MinioMultipartFileImpl
-
- All Implemented Interfaces:
MinioMultipartFile,MinioObjectId,MinioObjectInfo,org.springframework.core.io.InputStreamSource,org.springframework.web.multipart.MultipartFile
public class MinioMultipartFileImpl extends Object implements MinioMultipartFile
The minio multipart file implementation.- Author:
- Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description MinioMultipartFileImpl(MinioOperations minioOperations, String region, io.minio.StatObjectResponse objectStatus)Instantiates a new minio multipart file.MinioMultipartFileImpl(MinioOperations minioOperations, String region, String bucket, io.minio.messages.Item item)Instantiates a new minio multipart file.MinioMultipartFileImpl(MinioOperations minioOperations, MinioObjectInfo minioObjectInfo)Instantiates a new minio multipart file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes()StringgetContentType()StringgetEtag()Gets etag.InputStreamgetInputStream()OffsetDateTimegetLastModified()Gets last modified time.StringgetName()Gets name.protected io.minio.StatObjectResponsegetObjectStatus()Gets object status.StringgetOriginalFilename()longgetSize()booleanisEmpty()voidtransferTo(File dest)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bremersee.data.minio.MinioObjectId
getVersionId
-
Methods inherited from interface org.bremersee.data.minio.MinioObjectInfo
getBucket, getRegion
-
-
-
-
Constructor Detail
-
MinioMultipartFileImpl
public MinioMultipartFileImpl(MinioOperations minioOperations, MinioObjectInfo minioObjectInfo)
Instantiates a new minio multipart file.- Parameters:
minioOperations- the minio operationsminioObjectInfo- the minio object info
-
MinioMultipartFileImpl
public MinioMultipartFileImpl(MinioOperations minioOperations, String region, io.minio.StatObjectResponse objectStatus)
Instantiates a new minio multipart file.- Parameters:
minioOperations- the minio operationsregion- the regionobjectStatus- the object status
-
MinioMultipartFileImpl
public MinioMultipartFileImpl(MinioOperations minioOperations, String region, String bucket, io.minio.messages.Item item)
Instantiates a new minio multipart file.- Parameters:
minioOperations- the minio operationsregion- the regionbucket- the bucketitem- the item
-
-
Method Detail
-
getObjectStatus
protected io.minio.StatObjectResponse getObjectStatus()
Gets object status.- Returns:
- the object status
-
getName
@NonNull public String getName()
Description copied from interface:MinioObjectIdGets name.- Specified by:
getNamein interfaceMinioObjectId- Specified by:
getNamein interfaceorg.springframework.web.multipart.MultipartFile- Returns:
- the name
-
getOriginalFilename
public String getOriginalFilename()
- Specified by:
getOriginalFilenamein interfaceorg.springframework.web.multipart.MultipartFile
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfaceorg.springframework.web.multipart.MultipartFile
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.springframework.web.multipart.MultipartFile
-
getSize
public long getSize()
- Specified by:
getSizein interfaceorg.springframework.web.multipart.MultipartFile
-
getBytes
@NonNull public byte[] getBytes() throws IOException- Specified by:
getBytesin interfaceorg.springframework.web.multipart.MultipartFile- Throws:
IOException
-
getInputStream
@NonNull public InputStream getInputStream()
- Specified by:
getInputStreamin interfaceorg.springframework.core.io.InputStreamSource- Specified by:
getInputStreamin interfaceorg.springframework.web.multipart.MultipartFile
-
transferTo
public void transferTo(@NonNull File dest) throws IOException, IllegalStateException- Specified by:
transferToin interfaceorg.springframework.web.multipart.MultipartFile- Throws:
IOExceptionIllegalStateException
-
getEtag
public String getEtag()
Description copied from interface:MinioObjectInfoGets etag.- Specified by:
getEtagin interfaceMinioObjectInfo- Returns:
- the etag
-
getLastModified
public OffsetDateTime getLastModified()
Description copied from interface:MinioObjectInfoGets last modified time.- Specified by:
getLastModifiedin interfaceMinioObjectInfo- Returns:
- the last modified time
-
-