Package org.jsignal.std
Record Class Blob
java.lang.Object
java.lang.Record
org.jsignal.std.Blob
-
Constructor Summary
ConstructorDescriptionBlob
(byte[] data, com.google.common.net.MediaType mime) Creates an instance of aBlob
record class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
data()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.static Blob
static Blob
static Blob
fromResource
(String name, com.google.common.net.MediaType type) final int
hashCode()
Returns a hash code value for this object.com.google.common.net.MediaType
mime()
Returns the value of themime
record component.io.github.humbleui.skija.Data
toData()
final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Blob
public Blob(byte[] data, com.google.common.net.MediaType mime) Creates an instance of aBlob
record class.- Parameters:
data
- the value for thedata
record componentmime
- the value for themime
record component
-
-
Method Details
-
toData
public io.github.humbleui.skija.Data toData() -
fromResource
public static Blob fromResource(String name, com.google.common.net.MediaType type) throws BlobException - Throws:
BlobException
-
fromPath
- Throws:
BlobException
-
fromPath
- Throws:
BlobException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
data
public byte[] data()Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-
mime
public com.google.common.net.MediaType mime()Returns the value of themime
record component.- Returns:
- the value of the
mime
record component
-