public final class Thumbnail extends Object
InputStream
with the thumbnail, the size of the stream and the last date modified.Modifier and Type | Method and Description |
---|---|
static Thumbnail |
createFromFile(File file,
com.google.common.net.MediaType mediaType)
Create a thumbnail with a content type and a
File as source. |
static Thumbnail |
createFromStream(InputStream inputStream,
long lengthOfStream,
com.google.common.net.MediaType mediaType,
Date lastModifiedDate)
Create a thumbnail with a
MediaType , an InputStream as source, the length of the InputStream and the last date
modified. |
InputStream |
getInputStream() |
Date |
getLastModifiedDate() |
long |
getLengthOfStream() |
com.google.common.net.MediaType |
getMediaType() |
String |
toString() |
public static Thumbnail createFromStream(InputStream inputStream, long lengthOfStream, com.google.common.net.MediaType mediaType, Date lastModifiedDate)
MediaType
, an InputStream
as source, the length of the InputStream
and the last date
modified.inputStream
- the input stream of the thumbnaillengthOfStream
- the length of the input streammediaType
- the media type of the thumbnaillastModifiedDate
- the last date modified of the given input streamIllegalArgumentException
- if lengthOfStream is smaller then 0public static Thumbnail createFromFile(File file, com.google.common.net.MediaType mediaType)
File
as source.file
- The file which holds the thumbnail.mediaType
- The content type of the thumbnail.IllegalArgumentException
- if file cannot be readpublic InputStream getInputStream()
public long getLengthOfStream()
public com.google.common.net.MediaType getMediaType()
public Date getLastModifiedDate()
Copyright © 2010 - 2017 edorasware ag. All Rights Reserved.