Interface Favicon


  • public interface Favicon
    Represents an icon for the server sent in the StatusResponse.
    • Method Detail

      • load

        static Favicon load​(String raw)
                     throws 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:
        IOException - If the favicon couldn't be loaded
      • load

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

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

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

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