Interface Favicon


  • public interface Favicon
    Represents an icon for the server sent in the StatusResponse.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  Favicon.Factory  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.awt.image.BufferedImage image()
      Gets the decoded image of this favicon.
      static Favicon load​(java.awt.image.BufferedImage image)
      Loads a favicon from a specified BufferedImage.
      static Favicon load​(java.io.InputStream in)
      Loads a favicon from a specified InputStream.
      static Favicon load​(java.lang.String raw)
      Loads a Favicon from the specified encoded string.
      static Favicon load​(java.net.URL url)
      Loads a favicon from a specified URL.
      static Favicon load​(java.nio.file.Path path)
      Loads a favicon from a specified Path.
    • Method Detail

      • load

        static Favicon load​(java.lang.String raw)
                     throws java.io.IOException
        Loads a Favicon from the specified encoded string. The format of the input depends on the implementation.
        Parameters:
        raw - The encoded favicon
        Returns:
        The loaded favicon
        Throws:
        java.io.IOException - If the favicon couldn't be loaded
      • load

        static Favicon load​(java.nio.file.Path path)
                     throws java.io.IOException
        Loads a favicon from a specified Path.
        Parameters:
        path - The path to the favicon
        Returns:
        The loaded favicon from the file
        Throws:
        java.io.IOException - If the favicon couldn't be loaded
        java.io.FileNotFoundException - If the file doesn't exist
      • load

        static Favicon load​(java.net.URL url)
                     throws java.io.IOException
        Loads a favicon from a specified URL.
        Parameters:
        url - The favicon URL
        Returns:
        The loaded favicon from the URL
        Throws:
        java.io.IOException - If the favicon couldn't be loaded
      • load

        static Favicon load​(java.io.InputStream in)
                     throws java.io.IOException
        Loads a favicon from a specified InputStream.
        Parameters:
        in - The favicon input stream
        Returns:
        The loaded favicon from the input stream
        Throws:
        java.io.IOException - If the favicon couldn't be loaded
      • load

        static Favicon load​(java.awt.image.BufferedImage image)
                     throws java.io.IOException
        Loads a favicon from a specified BufferedImage.
        Parameters:
        image - The favicon image
        Returns:
        The loaded favicon from the image
        Throws:
        java.io.IOException - If the favicon couldn't be loaded
      • image

        java.awt.image.BufferedImage image()
        Gets the decoded image of this favicon.
        Returns:
        The decoded image