de.jstacs.results
Class ImageResult
java.lang.Object
de.jstacs.results.Result
de.jstacs.results.ImageResult
- All Implemented Interfaces:
- Storable
public class ImageResult
- extends Result
A class for results that are images of the PNG format. The images themselves cannot be stored to an XML-representation and
thus only the description (name, etc.) is stored.
- Author:
- Jan Grau
ImageResult
public ImageResult(String name,
String comment,
BufferedImage image)
- Constructs a new
ImageResult
from a BufferedImage
.
- Parameters:
name
- the name of the imagecomment
- a comment on the imageimage
- the image
getResult
public BufferedImage getResult()
- Description copied from class:
Result
- Returns the value of the result.
- Specified by:
getResult
in class Result
- Returns:
- the value
toXML
public StringBuffer toXML()
- Description copied from interface:
Storable
- This method returns an XML-representation of an instance of the
implementing class.
- Returns:
- the XML-representation
fromXML
protected void fromXML(StringBuffer representation)
throws NonParsableException
- Description copied from class:
Result
- This method is used in
Result.Result(StringBuffer)
to extract the information.
The method can be seen as opposite of Storable.toXML()
and should not be made public.
- Specified by:
fromXML
in class Result
- Parameters:
representation
- a xml represenation
- Throws:
NonParsableException
- if the xml representation is not parsable- See Also:
Result.extractMainInfo(StringBuffer)
toString
public String toString()
- Overrides:
toString
in class Object