public ByteBuffer getBlob(GetBlobOptions options) throws RouterException {
      ByteBuffer buf;
      if (options.getRange() == null) {
        buf = getBlob();
      } else {
        ByteRange resolvedRange;
        try {
          resolvedRange =
              options.getRange().toResolvedByteRange(blob.array().length, options.resolveRangeOnEmptyBlob());
        } catch (IllegalArgumentException e) {
          throw new RouterException("Invalid range for blob", e, RouterErrorCode.RangeNotSatisfiable);
        }
        byte[] bytes = new byte[(int) resolvedRange.getRangeSize()];
        ByteBuffer duplicate = blob.duplicate();
        duplicate.position((int) resolvedRange.getStartOffset());
        duplicate.get(bytes);
        buf = ByteBuffer.wrap(bytes);
      }
      return buf;
    }
@param options any options specified for fetching the blob.
@return the blob content within the provided range, or the entire blob, if the range is null.
@throws RouterException if the range was non-null, but could not be resolved.
ambry-test-utils/src/main/java/com/github/ambry/router/InMemoryRouter.java