|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.results.Result
de.jstacs.results.ImageResult
public class ImageResult
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.
Field Summary |
---|
Fields inherited from class de.jstacs.results.Result |
---|
comment, datatype, name |
Constructor Summary | |
---|---|
ImageResult(StringBuffer xml)
The standard constructor for the interface Storable . |
|
ImageResult(String name,
String comment,
BufferedImage image)
Constructs a new ImageResult from a BufferedImage . |
Method Summary | |
---|---|
protected void |
fromXML(StringBuffer representation)
This method is used in Result.Result(StringBuffer) to extract the
information. |
BufferedImage |
getResult()
Returns the value of the Result . |
String |
toString()
|
StringBuffer |
toXML()
This method returns an XML representation as StringBuffer of an
instance of the implementing class. |
Methods inherited from class de.jstacs.results.Result |
---|
appendMainInfo, checkDatatype, createResult, extractMainInfo, getComment, getDatatype, getName, isCastableResult, isComparableResult |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ImageResult(String name, String comment, BufferedImage image)
ImageResult
from a BufferedImage
.
name
- the name of the imagecomment
- a comment on the imageimage
- the image itselfpublic ImageResult(StringBuffer xml) throws NonParsableException
Storable
.
Constructs a ImageResult
out of an XML representation.
xml
- the XML representation as StringBuffer
NonParsableException
- if the ImageResult
could not be reconstructed out of
the StringBuffer
xml
Method Detail |
---|
public BufferedImage getResult()
Result
Result
.
getResult
in class Result
Result
public StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.
protected void fromXML(StringBuffer representation) throws NonParsableException
Result
Result.Result(StringBuffer)
to extract the
information. The method can be seen as opposite of
Storable.toXML()
and should not be made public.
fromXML
in class Result
representation
- the XML represenation of the Result
to be parsed
NonParsableException
- if the XML representation is not parsableResult.extractMainInfo(StringBuffer)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |