Class ClipboardImageResult


  • public class ClipboardImageResult
    extends ClipboardResult
    Result object for clipboard image operations containing either success data or error information.

    This class extends ClipboardResult to provide additional image-specific properties such as MIME type, image dimensions, and binary image data.

    Success is indicated when getError() returns null. Use isSuccess() for convenient success checking.

    • Constructor Detail

      • ClipboardImageResult

        public ClipboardImageResult()
    • Method Detail

      • getMimeType

        public String getMimeType()
        Gets the MIME type of the clipboard image.
        Returns:
        the image MIME type (e.g., "image/png", "image/jpeg"), or null if no image data
      • getImageData

        public byte[] getImageData()
        Gets the binary image data from the clipboard.
        Returns:
        the image data as a byte array, or null if no image data or error occurred
      • hasImageData

        public boolean hasImageData()
        Checks if this result contains valid image data.
        Returns:
        true if image data is available and the operation succeeded, false otherwise
      • getWidth

        public int getWidth()
        Gets the image width in pixels.
        Returns:
        the image width, or 0 if not available
      • getHeight

        public int getHeight()
        Gets the image height in pixels.
        Returns:
        the image height, or 0 if not available
      • getSize

        public long getSize()
        Gets the size of the image data in bytes.
        Returns:
        the image size in bytes, or 0 if not available
      • isSupportedFormat

        public boolean isSupportedFormat()
        Checks if the image is of a supported format based on MIME type.
        Returns:
        true if the image format is supported, false otherwise