Interface EmbedImage
-
public interface EmbedImageThis interface represents an embed image.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.awt.image.BufferedImage>asBufferedImage(DiscordApi api)Downloads the image as aBufferedImage.java.util.concurrent.CompletableFuture<byte[]>asByteArray(DiscordApi api)Downloads the image as a byte array.java.io.InputStreamasInputStream(DiscordApi api)Downloads the image as an input stream.intgetHeight()Gets the height of the image.java.net.URLgetProxyUrl()Gets the proxy url of the image.java.net.URLgetUrl()Gets the url of the image.intgetWidth()Gets the width of the image.
-
-
-
Method Detail
-
getUrl
java.net.URL getUrl()
Gets the url of the image.- Returns:
- The url of the image.
-
getProxyUrl
java.net.URL getProxyUrl()
Gets the proxy url of the image.- Returns:
- The proxy url of the image.
-
getHeight
int getHeight()
Gets the height of the image.- Returns:
- The height of the image.
-
getWidth
int getWidth()
Gets the width of the image.- Returns:
- The width of the image.
-
asBufferedImage
java.util.concurrent.CompletableFuture<java.awt.image.BufferedImage> asBufferedImage(DiscordApi api)
Downloads the image as aBufferedImage.- Parameters:
api- The discord api instance used to download the image.- Returns:
- The thumbnail as a
BufferedImage.
-
asByteArray
java.util.concurrent.CompletableFuture<byte[]> asByteArray(DiscordApi api)
Downloads the image as a byte array.- Parameters:
api- The discord api instance used to download the image.- Returns:
- The thumbnail as a byte array.
-
asInputStream
java.io.InputStream asInputStream(DiscordApi api) throws java.io.IOException
Downloads the image as an input stream.- Parameters:
api- The discord api instance used to download the image.- Returns:
- The thumbnail as an input stream.
- Throws:
java.io.IOException- If an IO error occurs.
-
-