Package com.s3auth.hosts

Examples of com.s3auth.hosts.Range


                .append("Host:local\n")
                .append("Accept:text/plain\n")
                .append("Range: bytes=100-200\n\nbody")
                .toString()
        );
        final Range range = request.range();
        MatcherAssert.assertThat(
            range.first(),
            Matchers.is(100L)
        );
        MatcherAssert.assertThat(
            range.last(),
            Matchers.is(200L)
        );
    }
View Full Code Here


                .append("Host:local\n")
                .append("Accept:text/plain\n")
                .append("Range: bytes=100-\n\nbody")
                .toString()
        );
        final Range range = request.range();
        MatcherAssert.assertThat(
            range.first(),
            Matchers.is(100L)
        );
        MatcherAssert.assertThat(
            range.last(),
            Matchers.is(Long.MAX_VALUE)
        );
    }
View Full Code Here

     * @return The URI
     * @throws HttpException If something is wrong
     * @see <a href="http://en.wikipedia.org/wiki/Byte_serving">Byte Serving</a>
     */
    public Range range() throws HttpException {
        final Range range;
        if (this.hdrs.containsKey(HttpRequest.RANGE_HEADER)) {
            final Matcher matcher = HttpRequest.RANGE_PATTERN.matcher(
                this.hdrs.get(HttpRequest.RANGE_HEADER).iterator().next()
            );
            if (!matcher.matches()) {
View Full Code Here

TOP

Related Classes of com.s3auth.hosts.Range

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.