Class GeneratedImage

    • Constructor Summary

      Constructors 
      Constructor Description
      GeneratedImage​(java.io.InputStream inputStream)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @Nullable java.awt.image.BufferedImage getAsBufferedImage()
      Gets the generated image as a BufferedImage or null if an IOException is encountered.
      java.io.InputStream getAsInputStream()
      Gets the Generated Image as an InputStream.
      int getCode()
      Always returns 200 as a GeneratedImage instance is only returned on a successful request.
      @Nullable java.lang.String getMessage()
      Always returns null as the returned content is an Image and not JSON.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GeneratedImage

        public GeneratedImage​(java.io.InputStream inputStream)
    • Method Detail

      • getCode

        public int getCode()
        Always returns 200 as a GeneratedImage instance is only returned on a successful request.
        Specified by:
        getCode in interface GenericAPIResponse
        Returns:
        200.
      • getMessage

        @Nullable
        public @Nullable java.lang.String getMessage()
        Always returns null as the returned content is an Image and not JSON.
        Specified by:
        getMessage in interface GenericAPIResponse
        Returns:
        null
      • getAsInputStream

        public java.io.InputStream getAsInputStream()
        Gets the Generated Image as an InputStream.
        Returns:
        InputStream containing the image.
      • getAsBufferedImage

        @Nullable
        public @Nullable java.awt.image.BufferedImage getAsBufferedImage()
        Gets the generated image as a BufferedImage or null if an IOException is encountered.
        Returns:
        Possibly-null BufferedImage of the generated image.