Class Negotiator


  • public class Negotiator
    extends Object
    Author:
    Pascal-Nicolas Becker (dspace -at- pascal -hyphen- becker -dot- de)
    • Method Detail

      • negotiate

        public static int negotiate​(String acceptHeader)
      • getMediaRangeComparator

        public static Comparator<MediaRange> getMediaRangeComparator()
        Method to get a comparator to compare media ranges regarding their content negotiation precedence. Following RFC 2616 a media range is higher prioritized then another media range if the first one has a higher quality value then the second. If both quality values are equal, the media range that is more specific should be used.

        Note: this comparator imposes orderings that are inconsistent with equals! Caution should be exercised when using it to order a sorted set or a sorted map. Take a look at the java.util.Comparator for further information.

        Returns:
        A comparator that imposes orderings that are inconsistent with equals!
      • sendRedirect

        public static boolean sendRedirect​(javax.servlet.http.HttpServletResponse response,
                                           String handle,
                                           String extraPathInfo,
                                           int serialization,
                                           boolean redirectHTML)
                                    throws IOException
        Throws:
        IOException