Class ImageProfile
- java.lang.Object
-
- org.silverpeas.web.directory.servlets.ImageProfile
-
public class ImageProfile extends Object
-
-
Constructor Summary
Constructors Constructor Description ImageProfile(String photo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexist()InputStreamgetImage()StringgetMimeType()Gets the MIME type of the image.booleanisImage()voidremoveImage()remove existing imagevoidsaveImage(InputStream data)Saves the image in the specified input stream.
-
-
-
Constructor Detail
-
ImageProfile
public ImageProfile(String photo)
-
-
Method Detail
-
isImage
public boolean isImage()
-
getMimeType
public String getMimeType()
Gets the MIME type of the image.- Returns:
- the MIME type of the image.
-
saveImage
public void saveImage(InputStream data) throws IOException
Saves the image in the specified input stream.- Parameters:
data- an input stream on an image data.- Throws:
IOException- if an error occurs while reading the input stream and saving the image.
-
removeImage
public void removeImage()
remove existing image
-
getImage
public InputStream getImage() throws IOException
- Throws:
IOException
-
exist
public boolean exist()
-
-