Interface OutputType<T>

Type Parameters:
T - Type for the screenshot output.

public interface OutputType<T>
Defines the output type for a screenshot.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final OutputType<String>
    Obtain the screenshot as base64 data.
    static final OutputType<byte[]>
    Obtain the screenshot as raw bytes.
    static final OutputType<File>
    Obtain the screenshot into a temporary file that will be deleted once the JVM exits.
  • Method Summary

    Modifier and Type
    Method
    Description
    Convert the given base64 png to a requested format.
    convertFromPngBytes(byte[] png)
    Convert the given png to a requested format.
  • Field Details

    • BASE64

      static final OutputType<String> BASE64
      Obtain the screenshot as base64 data.
    • BYTES

      static final OutputType<byte[]> BYTES
      Obtain the screenshot as raw bytes.
    • FILE

      static final OutputType<File> FILE
      Obtain the screenshot into a temporary file that will be deleted once the JVM exits. It is up to users to make a copy of this file.
  • Method Details

    • convertFromBase64Png

      T convertFromBase64Png(String base64Png)
      Convert the given base64 png to a requested format.
      Parameters:
      base64Png - base64 encoded png.
      Returns:
      png encoded into requested format.
    • convertFromPngBytes

      T convertFromPngBytes(byte[] png)
      Convert the given png to a requested format.
      Parameters:
      png - an array of bytes forming a png file.
      Returns:
      png encoded into requested format.