public static final class ImageSizeConstraint.RawCodec extends ImageSizeConstraint<byte[]>
ImageSizeConstraint
implementation for
byte[]
type.ConstraintFactory.rawImageSize(int, int, ImageAdjust)
ImageSizeConstraint.AwtCodec, ImageSizeConstraint.Context, ImageSizeConstraint.IOContext, ImageSizeConstraint.RawCodec
Modifier and Type | Method and Description |
---|---|
protected ImageSizeConstraint.Context |
decodeImage(byte[] value)
Decodes the specified
byte[] array representing an
image into java.awt.Image and returns context that
contains image and its format name. |
protected byte[] |
encodeImage(ImageSizeConstraint.Context context)
Encodes
java.awt.Image from the specified context and
returns byte[] array representing that image. |
Class<?> |
getType()
Returns
byte[] type. |
appendMessageArguments, getAdjustMode, getMaxHeight, getMaxWidth, getMessageTemplate, toBufferedImage, validate
public Class<?> getType()
byte[]
type.byte[]
type.protected ImageSizeConstraint.Context decodeImage(byte[] value) throws IOException
byte[]
array representing an
image into java.awt.Image
and returns context that
contains image and its format name.decodeImage
in class ImageSizeConstraint<byte[]>
value
- byte[]
image representation.IOException
- if decoding of an image fails.protected byte[] encodeImage(ImageSizeConstraint.Context context) throws IOException
java.awt.Image
from the specified context and
returns byte[]
array representing that image.encodeImage
in class ImageSizeConstraint<byte[]>
context
- Image context.IOException
- if encoding of an image fails.Copyright © 2011–2020 FoxLabs. All rights reserved.