Record Class ByteRange
java.lang.Object
java.lang.Record
io.meeds.social.attachment.rest.model.ByteRange
- Record Components:
start- index of the first byte, starting at 0end- index of the last byte, includedsatisfiable- false when the range is outside the file, its bounds then meaning nothing
The part of a file a request asks for with its Range header.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longlength()booleanReturns the value of thesatisfiablerecord component.longstart()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
UNSATISFIABLE
-
-
Constructor Details
-
ByteRange
public ByteRange(long start, long end) -
ByteRange
public ByteRange(long start, long end, boolean satisfiable) Creates an instance of aByteRangerecord class.- Parameters:
start- the value for thestartrecord componentend- the value for theendrecord componentsatisfiable- the value for thesatisfiablerecord component
-
-
Method Details
-
length
public long length() -
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
start
-
end
-
satisfiable
public boolean satisfiable()Returns the value of thesatisfiablerecord component.- Returns:
- the value of the
satisfiablerecord component
-