Package de.gebit.integrity.fixtures
Class ExtendedResultFixture.ExtendedResultImage
- java.lang.Object
-
- de.gebit.integrity.fixtures.ExtendedResultFixture.ExtendedResult
-
- de.gebit.integrity.fixtures.ExtendedResultFixture.ExtendedResultImage
-
- Enclosing interface:
- ExtendedResultFixture
public static final class ExtendedResultFixture.ExtendedResultImage extends ExtendedResultFixture.ExtendedResult
Encapsulates an image which is to be provided as extended result. The creator can optionally specify the preferred compression type to use when the image is encoded to integrate it into the results.- Author:
- Rene Schneider - initial API and implementation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExtendedResultFixture.ExtendedResultImage.ImageCompressionType
This enum contains the supported image compression types, used when encoding the image for test results.
-
Constructor Summary
Constructors Constructor Description ExtendedResultImage(java.awt.image.BufferedImage anImage)
Creates a new instance, using the default compression type (PNG) and no title.ExtendedResultImage(java.lang.String aTitle, java.awt.image.BufferedImage anImage)
Creates a new instance, using the default compression type (PNG).ExtendedResultImage(java.lang.String aTitle, java.awt.image.BufferedImage anImage, ExtendedResultFixture.ExtendedResultImage.ImageCompressionType aCompressionType)
Creates a new instance, using the provided image and compression type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getEncodedImage()
int
getHeight()
ExtendedResultFixture.ExtendedResultImage.ImageCompressionType
getType()
int
getWidth()
-
Methods inherited from class de.gebit.integrity.fixtures.ExtendedResultFixture.ExtendedResult
getTitle
-
-
-
-
Constructor Detail
-
ExtendedResultImage
public ExtendedResultImage(java.awt.image.BufferedImage anImage) throws java.io.IOException
Creates a new instance, using the default compression type (PNG) and no title.- Parameters:
anImage
- the image to encapsulate- Throws:
java.io.IOException
- in case of compression/encoding errors
-
ExtendedResultImage
public ExtendedResultImage(java.lang.String aTitle, java.awt.image.BufferedImage anImage) throws java.io.IOException
Creates a new instance, using the default compression type (PNG).- Parameters:
aTitle
- the title of this extended result (may be null)anImage
- the image to encapsulate- Throws:
java.io.IOException
- in case of compression/encoding errors
-
ExtendedResultImage
public ExtendedResultImage(java.lang.String aTitle, java.awt.image.BufferedImage anImage, ExtendedResultFixture.ExtendedResultImage.ImageCompressionType aCompressionType) throws java.io.IOException
Creates a new instance, using the provided image and compression type.- Parameters:
aTitle
- the title of this extended result (may be null)anImage
- the image to encapsulateaCompressionType
- the preferred compression type to use when encoding the image for the results- Throws:
java.io.IOException
- in case of compression/encoding errors
-
-
Method Detail
-
getEncodedImage
public byte[] getEncodedImage()
-
getType
public ExtendedResultFixture.ExtendedResultImage.ImageCompressionType getType()
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
-