类 ResourceRegion
- java.lang.Object
- org.springframework.core.io.support.ResourceRegion
public class ResourceRegion extends Object
Region of aResource
implementation, materialized by aposition
within theResource
and a bytecount
for the length of that region.- 从以下版本开始:
- 4.3
- 作者:
- Arjen Poutsma
构造器概要
构造器 构造器 说明 ResourceRegion(Resource resource, long position, long count)
Create a newResourceRegion
from a givenResource
.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 long
getCount()
Return the byte count of this region in the underlyingResource
long
getPosition()
Return the start position of this region in the underlyingResource
Resource
getResource()
Return the underlyingResource
for thisResourceRegion
构造器详细资料
ResourceRegion
public ResourceRegion(Resource resource, long position, long count)
Create a newResourceRegion
from a givenResource
. This region of a resource is represented by a startposition
and a bytecount
within the givenResource
.- 参数:
resource
- a Resourceposition
- the start position of the region in that resourcecount
- the byte count of the region in that resource
方法详细资料
getResource
public Resource getResource()
Return the underlyingResource
for thisResourceRegion
getPosition
public long getPosition()
Return the start position of this region in the underlyingResource