Class Attachment
java.lang.Object
org.exoplatform.social.core.model.Attachment
- Direct Known Subclasses:
AvatarAttachment,BannerAttachment
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAttachment(String id, String fileName, String mimeType, InputStream inputStream, long lastModified) -
Method Summary
Modifier and TypeMethodDescriptionabstract StringGets the file name.getId()Gets the id.byte[]longGets the last modified.Gets the mime type.getSize()Gets images size in MB/ KB/ Bytes.voidSets the file name.voidSets the id.voidsetInputStream(InputStream input) Read image bytes from input streamvoidsetLastModified(long lastModified) Sets the last modified.voidSets the mime type.
-
Constructor Details
-
Attachment
protected Attachment() -
Attachment
protected Attachment(String id, String fileName, String mimeType, InputStream inputStream, long lastModified) throws IOException - Throws:
IOException
-
-
Method Details
-
getAttachmentType
-
getId
Gets the id.- Returns:
- the id
-
setId
Sets the id.- Parameters:
s- the new id
-
getFileName
Gets the file name.- Returns:
- the file name
-
setFileName
Sets the file name.- Parameters:
s- the new file name
-
getMimeType
Gets the mime type.- Returns:
- the mime type
-
setMimeType
Sets the mime type.- Parameters:
s- the new mime type
-
getLastModified
public long getLastModified()Gets the last modified.- Returns:
- the last modified
-
setLastModified
public void setLastModified(long lastModified) Sets the last modified.- Parameters:
lastModified- the new last modified
-
getSize
Gets images size in MB/ KB/ Bytes.- Returns:
- image size string
-
getImageBytes
public byte[] getImageBytes() -
setInputStream
Read image bytes from input stream- Parameters:
input- the new input stream- Throws:
IOException- the exception
-