Package org.javacord.core.entity
Class IconImpl
- java.lang.Object
-
- org.javacord.core.entity.IconImpl
-
-
Constructor Summary
Constructors Constructor Description IconImpl(DiscordApi api, URL url)
Creates a new icon object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<BufferedImage>
asBufferedImage()
CompletableFuture<byte[]>
asByteArray()
CompletableFuture<InputStream>
asInputStream()
DiscordApi
getApi()
Gets the discord api instance.URL
getUrl()
-
Methods inherited from interface org.javacord.api.entity.Icon
isAnimated
-
-
-
-
Constructor Detail
-
IconImpl
public IconImpl(DiscordApi api, URL url)
Creates a new icon object.- Parameters:
api
- The discord api instance.url
- The url of the icon.
-
-
Method Detail
-
getApi
public DiscordApi getApi()
Gets the discord api instance.- Returns:
- The discord api instance.
-
asByteArray
public CompletableFuture<byte[]> asByteArray()
- Specified by:
asByteArray
in interfaceIcon
-
asInputStream
public CompletableFuture<InputStream> asInputStream()
- Specified by:
asInputStream
in interfaceIcon
-
asBufferedImage
public CompletableFuture<BufferedImage> asBufferedImage()
- Specified by:
asBufferedImage
in interfaceIcon
-
-