public class Favicon extends Object
Modifier and Type | Method and Description |
---|---|
static Favicon |
create(BufferedImage image)
Creates a favicon from an image.
|
static Favicon |
create(String encodedString)
Deprecated.
Use #create(java.awt.image.BufferedImage) instead
|
@NonNull String |
getEncoded()
The base64 encoded favicon, including MIME header.
|
static com.google.gson.TypeAdapter<Favicon> |
getFaviconTypeAdapter() |
public static com.google.gson.TypeAdapter<Favicon> getFaviconTypeAdapter()
public static Favicon create(BufferedImage image)
image
- the image to create onIllegalArgumentException
- if the favicon is larger than
Short.MAX_VALUE
or not of dimensions 64x64 pixels.@Deprecated public static Favicon create(String encodedString)
encodedString
- a base64 mime encoded PNG string@NonNull public @NonNull String getEncoded()
Copyright © 2012–2020 SpigotMC. All rights reserved.