Interface AvatarSupplier

All Superinterfaces:
InputSupplier<InputStream>
All Known Subinterfaces:
CacheableAvatarSupplier
All Known Implementing Classes:
AbstractAvatarSupplier, DelegatingCacheableAvatarSupplier, FilePartAvatarSupplier, ResourceAvatarSupplier

public interface AvatarSupplier extends InputSupplier<InputStream>
Since:
9.5
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable String
    The content type of the avatar, e.g., "image/png"
    @NotNull InputStream
    Provides an InputStream to read the avatar.
  • Method Details

    • getContentType

      @Nullable @Nullable String getContentType()
      The content type of the avatar, e.g., "image/png"
      Returns:
      the string representing the content type
    • open

      @NotNull @NotNull InputStream open() throws IOException
      Provides an InputStream to read the avatar. Each call to this method will produce a new stream.
      Specified by:
      open in interface InputSupplier<InputStream>
      Returns:
      a stream from the avatar
      Throws:
      IOException - in case the avatar could not be opened or read