Package org.jsignal.std
Record Class Blob
java.lang.Object
java.lang.Record
org.jsignal.std.Blob
-
Constructor Summary
ConstructorsConstructorDescriptionBlob(byte[] data, com.google.common.net.MediaType mime) Creates an instance of aBlobrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]data()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.static Blobstatic Blobstatic BlobfromResource(String name, com.google.common.net.MediaType type) final inthashCode()Returns a hash code value for this object.com.google.common.net.MediaTypemime()Returns the value of themimerecord component.io.github.humbleui.skija.DatatoData()final StringtoString()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 aBlobrecord class.- Parameters:
data- the value for thedatarecord componentmime- the value for themimerecord 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 thedatarecord component.- Returns:
- the value of the
datarecord component
-
mime
public com.google.common.net.MediaType mime()Returns the value of themimerecord component.- Returns:
- the value of the
mimerecord component
-