Class RangeReader


  • public class RangeReader
    extends java.lang.Object
    Range header reader.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private RangeReader()
      Private constructor to ensure that the class acts as a true utility class i.e.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<Range> read​(java.lang.String rangeHeader)
      Parse the Range header and returns the list of corresponding Range objects.
      static void update​(java.lang.String value, Representation representation)
      Parse the Content-Range header value and update the given representation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RangeReader

        private RangeReader()
        Private constructor to ensure that the class acts as a true utility class i.e. it isn't instantiable and extensible.
    • Method Detail

      • update

        public static void update​(java.lang.String value,
                                  Representation representation)
        Parse the Content-Range header value and update the given representation.
        Parameters:
        value - Content-range header.
        representation - Representation to update.
      • read

        public static java.util.List<Range> read​(java.lang.String rangeHeader)
        Parse the Range header and returns the list of corresponding Range objects.
        Parameters:
        rangeHeader - The Range header value.
        Returns:
        The list of corresponding Range objects.