Package com.fasterxml.jackson.core.io

Examples of com.fasterxml.jackson.core.io.MergedStream.skip()


        // not supported when there's buffered stuff...
        assertFalse(ms.markSupported());
        // so this won't work, but shouldn't throw exception
        ms.mark(1);
        assertEquals((byte) 'A', ms.read());
        assertEquals(3, ms.skip(3));
        byte[] buffer = new byte[5];
        /* Ok, now, code is allowed to return anywhere between 1 and 3,
         * but we now it will return 1...
         */
        assertEquals(1, ms.read(buffer, 1, 3));
View Full Code Here


        assertEquals((byte) 'F', buffer[0]);
        assertEquals((byte) 'G', buffer[1]);
        assertEquals((byte) 'H', buffer[2]);
        assertEquals(2, ms.available());
        // And then skip the reset
        assertEquals(2, ms.skip(200));

        ms.close();
    }
}
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.