Class 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.
    Since:
    4.3
    Author:
    Arjen Poutsma
    • Constructor Detail

      • 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.
        Parameters:
        resource - a Resource
        position - the start position of the region in that resource
        count - the byte count of the region in that resource
    • Method Detail

      • 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.