public abstract class Image extends Object implements Serializable
Constructor and Description |
---|
Image(String mimeType,
Date lastModificationDate,
long size,
String providerId,
boolean defaultImage) |
Image(String mimeType,
Date lastModificationDate,
long size,
String providerId,
boolean defaultImage,
boolean isExternal) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes() |
Date |
getLastModificationDate() |
String |
getMimeType() |
String |
getProviderId() |
long |
getSize() |
boolean |
isDefaultImage() |
boolean |
isExternal() |
abstract InputStream |
openStream() |
void |
setExternal(boolean isExternal) |
void |
setLastModificationDate(Date lastModificationDate) |
void |
setMimeType(String mimeType) |
void |
setSize(long size) |
public Image(String mimeType, Date lastModificationDate, long size, String providerId, boolean defaultImage)
mimeType
- The mimetype.lastModificationDate
- The last modification date.size
- Size of the image in bytes.providerId
- The identifier of the provider that loaded the imagedefaultImage
- whether the image is a default image or a custom imagepublic Image(String mimeType, Date lastModificationDate, long size, String providerId, boolean defaultImage, boolean isExternal)
mimeType
- The mimetype.lastModificationDate
- The last modification date.size
- Size of the image in bytes.providerId
- The identifier of the provider that loaded the imagedefaultImage
- whether the image is a default image or a custom imageisExternal
- Set to true, if this image is an external image.public byte[] getBytes() throws IOException
IOException
- Thrown, when there was an array creating the bytes.public Date getLastModificationDate()
public String getMimeType()
public String getProviderId()
public long getSize()
public boolean isDefaultImage()
public boolean isExternal()
public abstract InputStream openStream() throws IOException
InputStream
to the image.IOException
- Thrown, when there was an error opening the stream.public void setExternal(boolean isExternal)
isExternal
- the isExternal to setpublic void setLastModificationDate(Date lastModificationDate)
lastModificationDate
- the lastModificationDate to setpublic void setMimeType(String mimeType)
mimeType
- the mimeType to setpublic void setSize(long size)
size
- the size to setCopyright © 2019 Communote team. All rights reserved.