Package com.atlassian.bitbucket.avatar
Class SimpleAvatarSupplier
java.lang.Object
com.atlassian.bitbucket.avatar.AbstractAvatarSupplier
com.atlassian.bitbucket.avatar.SimpleAvatarSupplier
- All Implemented Interfaces:
 AvatarSupplier,InputSupplier<InputStream>
A simple implementation of 
AvatarSupplier which accepts the InputStream containing the avatar's
 image data as a constructor parameter.- 
Constructor Summary
ConstructorsConstructorDescriptionSimpleAvatarSupplier(InputStream inputStream) SimpleAvatarSupplier(String contentType, InputStream inputStream) Constructs a newSimpleAvatarStreamwith the specifiedcontentTypewhich willreturnthe providedInputStream. - 
Method Summary
Modifier and TypeMethodDescriptionopen()Retrieves theInputStreamprovided when this supplier was constructed.Methods inherited from class com.atlassian.bitbucket.avatar.AbstractAvatarSupplier
getContentType 
- 
Constructor Details
- 
SimpleAvatarSupplier
- Parameters:
 inputStream- the input stream for this supplier- Throws:
 NullPointerException- if the providedinputStreamisnull
 - 
SimpleAvatarSupplier
Constructs a newSimpleAvatarStreamwith the specifiedcontentTypewhich willreturnthe providedInputStream.- Parameters:
 contentType- the declared content type for the avatar, which may benullif not knowninputStream- the input stream for this supplier- Throws:
 NullPointerException- if the providedinputStreamisnull
 
 - 
 - 
Method Details
- 
open
Retrieves theInputStreamprovided when this supplier was constructed.- Returns:
 - the input stream containing the avatar data
 
 
 -