Package discord4j.rest.util
Class Image
java.lang.Object
discord4j.rest.util.Image
Represents a Discord image.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanbyte[]getData()Gets the raw data of the image.Gets a data URI for this image.Gets the format of the image.getHash()Gets the Base64-encoded data of the image.inthashCode()static ImageofRaw(byte[] data, Image.Format format) Constructs anImageutilizing raw image data.Constructs anImageusing the resource at the given url.toString()
-
Method Details
-
ofRaw
Constructs anImageutilizing raw image data.- Parameters:
data- The raw image data.format- TheImage.Formatof the data.- Returns:
- An
Imagewith raw image data.
-
ofUrl
Constructs anImageusing the resource at the given url. -
getData
public byte[] getData()Gets the raw data of the image.- Returns:
- The raw data of the image.
-
getFormat
Gets the format of the image.- Returns:
- The format of the image.
-
getHash
Gets the Base64-encoded data of the image.- Returns:
- The Base64-encoded data of the image.
-
getDataUri
Gets a data URI for this image.- Returns:
- The data URI for this image.
-
toString
-
equals
-
hashCode
public int hashCode()
-