类 ResourceRegion

java.lang.Object
cn.taketoday.core.io.ResourceRegion

public class ResourceRegion extends Object
Region of a Resource implementation, materialized by a position within the Resource and a byte count for the length of that region.
从以下版本开始:
4.0 2021/11/6 12:28
作者:
Arjen Poutsma, Harry Yang
  • 字段详细资料

    • count

      private final long count
    • position

      private final long position
    • resource

      private final Resource resource
  • 构造器详细资料

    • ResourceRegion

      public ResourceRegion(Resource resource, long position, long count)
      Create a new ResourceRegion from a given Resource. This region of a resource is represented by a start position and a byte count within the given Resource.
      参数:
      resource - a Resource
      position - the start position of the region in that resource
      count - the byte count of the region in that resource
  • 方法详细资料

    • getResource

      public Resource getResource()
      Return the underlying Resource for this ResourceRegion.
    • getPosition

      public long getPosition()
      Return the start position of this region in the underlying Resource.
    • getCount

      public long getCount()
      Return the byte count of this region in the underlying Resource.