Class HttpRangeProcessor


  • public class HttpRangeProcessor
    extends Object
    Generates HTTP response for "Range" scoped HTTP requests for content.
    • Constructor Detail

      • HttpRangeProcessor

        public HttpRangeProcessor​(ContentService contentService)
        Constructor.
        Parameters:
        contentService - ContentService
    • Method Detail

      • processRange

        public boolean processRange​(javax.servlet.http.HttpServletResponse res,
                                    ContentReader reader,
                                    String range,
                                    NodeRef ref,
                                    org.alfresco.service.namespace.QName property,
                                    String mimetype,
                                    String userAgent)
                             throws IOException
        Process a range header for a HttpServletResponse - handles single and multiple range requests.
        Parameters:
        res - the HTTP servlet response
        reader - the content reader
        range - the byte range
        ref - the content NodeRef
        property - the content property
        mimetype - the content mimetype
        userAgent - the user agent string
        Returns:
        whether or not the range could be processed
        Throws:
        IOException
      • processRange

        public boolean processRange​(org.springframework.extensions.webscripts.WebScriptResponse res,
                                    ContentReader reader,
                                    String range,
                                    NodeRef ref,
                                    org.alfresco.service.namespace.QName property,
                                    String mimetype,
                                    String userAgent)
                             throws IOException
        Process a range header for a WebScriptResponse - handles single and multiple range requests.
        Parameters:
        res - the webscript response
        reader - the content reader
        range - the byte range
        ref - the content NodeRef
        property - the content property
        mimetype - the content mimetype
        userAgent - the user agent string
        Returns:
        whether or not the range could be processed
        Throws:
        IOException