Package org.restlet.data

Examples of org.restlet.data.Range


            return null;
        }

        final StringBuilder value = new StringBuilder("bytes=");
        for (int i = 0; i < ranges.size(); i++) {
            Range range = ranges.get(i);
            if (i > 0) {
                value.append(", ");
            }

            if (range.getIndex() >= Range.INDEX_FIRST) {
                value.append(range.getIndex());
                value.append("-");
                if (range.getSize() != Range.SIZE_MAX) {
                    value.append(range.getIndex() + range.getSize());
                }
            } else if (range.getIndex() == Range.INDEX_LAST) {
                value.append("-");
                if (range.getSize() != Range.SIZE_MAX) {
                    value.append(range.getSize());
                }
            }
        }

        return value.toString();
View Full Code Here

TOP

Related Classes of org.restlet.data.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.