Package io.github.jbastgen.stemma.app.io
Record Class ImageFiles.Version
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.app.io.ImageFiles.Version
- Record Components:
bytes- the content, ornullwhen the file is larger thanImageFiles.MAX_BYTES(it was not read)size- the size of the file in bytes
- Enclosing class:
ImageFiles
One version of a picture file.
-
Constructor Summary
ConstructorsConstructorDescriptionVersion(byte[] bytes, long size) Creates an instance of aVersionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]bytes()Returns the value of thebytesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static ImageFiles.Versionof(byte[] content) The picture of a file; one that is too big is not kept, only its size.longsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
of
The picture of a file; one that is too big is not kept, only its size. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
bytes
public byte[] bytes()Returns the value of thebytesrecord component.- Returns:
- the value of the
bytesrecord component
-
size
public long size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-