Class ByteRange

java.lang.Object
edu.ucsb.nceas.metacat.restservice.ByteRange

public class ByteRange extends Object
This class parses the byte range header in the https requests
  • Constructor Details

    • ByteRange

      public ByteRange(long start, Long end)
      Constructor
      Parameters:
      start - the start of the byte range
      end - the end of the byte range. Null means open-ended
  • Method Details

    • getStart

      public long getStart()
      Get the start value of the range
      Returns:
      the start value of the range
    • getEnd

      public Long getEnd()
      Get the end value of the range
      Returns:
      the end value of the range. Null means open-ended.
    • parseRange

      public static ByteRange parseRange(javax.servlet.http.HttpServletRequest request) throws org.dataone.service.exceptions.InvalidRequest
      Parse the http request to get the byte range
      Parameters:
      request - the request needs to be parsed
      Returns:
      the byte range in the request. Null will be returned if there is no range specified
      Throws:
      org.dataone.service.exceptions.InvalidRequest