Package org.springframework.core.io.support

# Class ResourceRegion

java.lang.Object
org.springframework.core.io.support.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 Summary

Constructors
Constructor
Description
`ResourceRegion(Resource resource, long position, long count)`
Create a new `ResourceRegion` from a given `Resource`.

## Method Summary

Modifier and Type
Method
Description
`long`
`getCount()`
Return the byte count of this region in the underlying `Resource`.
`long`
`getPosition()`
Return the start position of this region in the underlying `Resource`.
`Resource`
`getResource()`
Return the underlying `Resource` for this `ResourceRegion`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### 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 Details

### 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`.