public class

SimpleAvatarSupplier

extends AbstractAvatarSupplier
java.lang.Object
   ↳ com.atlassian.bitbucket.avatar.AbstractAvatarSupplier
     ↳ com.atlassian.bitbucket.avatar.SimpleAvatarSupplier

Class Overview

A simple implementation of AvatarSupplier which accepts the InputStream containing the avatar's image data as a constructor parameter.

Summary

Public Constructors
SimpleAvatarSupplier(InputStream inputStream)
Constructs a new SimpleAvatarSupplier which will return the provided InputStream.
SimpleAvatarSupplier(String contentType, InputStream inputStream)
Constructs a new SimpleAvatarStream with the specified contentType which will return the provided InputStream.
Public Methods
@Nonnull InputStream open()
Retrieves the InputStream provided when this supplier was constructed.
[Expand]
Inherited Methods
From class com.atlassian.bitbucket.avatar.AbstractAvatarSupplier
From class java.lang.Object
From interface com.atlassian.bitbucket.avatar.AvatarSupplier
From interface com.atlassian.bitbucket.io.InputSupplier

Public Constructors

public SimpleAvatarSupplier (InputStream inputStream)

Constructs a new SimpleAvatarSupplier which will return the provided InputStream.

Parameters
inputStream the input stream for this supplier
Throws
NullPointerException if the provided inputStream is null

public SimpleAvatarSupplier (String contentType, InputStream inputStream)

Constructs a new SimpleAvatarStream with the specified contentType which will return the provided InputStream.

Parameters
contentType the declared content type for the avatar, which may be null if not known
inputStream the input stream for this supplier
Throws
NullPointerException if the provided inputStream is null

Public Methods

@Nonnull public InputStream open ()

Retrieves the InputStream provided when this supplier was constructed.

Returns
  • the input stream containing the avatar data