Record Class RangeUtils.ByteRange
java.lang.Object
java.lang.Record
io.leandev.appfuse.file.RangeUtils.ByteRange
- Record Components:
start- 起始位置(0-based,含)end- 結束位置(0-based,含)total- 檔案總大小
- Enclosing class:
RangeUtils
位元組範圍
-
Constructor Summary
ConstructorsConstructorDescriptionByteRange(long start, long end, long total) Creates an instance of aByteRangerecord class. -
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()計算範圍長度longstart()Returns the value of thestartrecord component.產生 Content-Range header 值final StringtoString()Returns a string representation of this record class.longtotal()Returns the value of thetotalrecord component.
-
Constructor Details
-
ByteRange
-
-
Method Details
-
length
public long length()計算範圍長度- Returns:
- 範圍內的位元組數
-
toContentRange
-
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
-
total
-