Class MinioMultipartFileImpl

java.lang.Object
org.bremersee.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 Details

    • MinioMultipartFileImpl

      public MinioMultipartFileImpl(MinioOperations minioOperations, MinioObjectInfo minioObjectInfo)
      Instantiates a new minio multipart file.
      Parameters:
      minioOperations - the minio operations
      minioObjectInfo - 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 operations
      region - the region
      objectStatus - 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 operations
      region - the region
      bucket - the bucket
      item - the item
  • Method Details

    • getObjectStatus

      protected io.minio.StatObjectResponse getObjectStatus()
      Gets object status.
      Returns:
      the object status
    • getName

      @NonNull public String getName()
      Description copied from interface: MinioObjectId
      Gets name.
      Specified by:
      getName in interface MinioObjectId
      Specified by:
      getName in interface org.springframework.web.multipart.MultipartFile
      Returns:
      the name
    • getOriginalFilename

      public String getOriginalFilename()
      Specified by:
      getOriginalFilename in interface org.springframework.web.multipart.MultipartFile
    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface org.springframework.web.multipart.MultipartFile
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.springframework.web.multipart.MultipartFile
    • getSize

      public long getSize()
      Specified by:
      getSize in interface org.springframework.web.multipart.MultipartFile
    • getBytes

      @NonNull public byte[] getBytes() throws IOException
      Specified by:
      getBytes in interface org.springframework.web.multipart.MultipartFile
      Throws:
      IOException
    • getInputStream

      @NonNull public InputStream getInputStream()
      Specified by:
      getInputStream in interface org.springframework.core.io.InputStreamSource
      Specified by:
      getInputStream in interface org.springframework.web.multipart.MultipartFile
    • transferTo

      public void transferTo(@NonNull File dest) throws IOException, IllegalStateException
      Specified by:
      transferTo in interface org.springframework.web.multipart.MultipartFile
      Throws:
      IOException
      IllegalStateException
    • getEtag

      public String getEtag()
      Description copied from interface: MinioObjectInfo
      Gets etag.
      Specified by:
      getEtag in interface MinioObjectInfo
      Returns:
      the etag
    • getLastModified

      public OffsetDateTime getLastModified()
      Description copied from interface: MinioObjectInfo
      Gets last modified time.
      Specified by:
      getLastModified in interface MinioObjectInfo
      Returns:
      the last modified time