add RequestRange
This commit is contained in:
39
src/main/java/com/imyeyu/spring/bean/RequestRange.java
Normal file
39
src/main/java/com/imyeyu/spring/bean/RequestRange.java
Normal file
@@ -0,0 +1,39 @@
|
||||
package com.imyeyu.spring.bean;
|
||||
|
||||
/**
|
||||
* @author 夜雨
|
||||
* @since 2025-07-14 17:09
|
||||
*/
|
||||
public class RequestRange {
|
||||
|
||||
private long start;
|
||||
|
||||
private long end;
|
||||
|
||||
private long length;
|
||||
|
||||
public RequestRange(long start, long end) {
|
||||
this.start = start;
|
||||
this.end = end;
|
||||
}
|
||||
|
||||
public long getStart() {
|
||||
return start;
|
||||
}
|
||||
|
||||
public void setStart(long start) {
|
||||
this.start = start;
|
||||
}
|
||||
|
||||
public long getEnd() {
|
||||
return end;
|
||||
}
|
||||
|
||||
public void setEnd(long end) {
|
||||
this.end = end;
|
||||
}
|
||||
|
||||
public long getLength() {
|
||||
return end - start + 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user