Examples of RangeRepresentation


Examples of org.restlet.engine.application.RangeRepresentation

*/
public class RangeRepresentationTestCase extends RestletTestCase {

    public void testAppendable() throws Exception {
        StringRepresentation sr = new StringRepresentation("1234567890");
        RangeRepresentation rr = new RangeRepresentation(sr);
        rr.setRange(new Range(2, 5));
        assertNull(sr.getRange());
        assertEquals(10, sr.getAvailableSize());
        assertEquals(5, rr.getAvailableSize());
        assertEquals("1234567890", sr.getText());
        assertEquals("34567", rr.getText());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.