Package org.apache.james.mime4j.io

Examples of org.apache.james.mime4j.io.RootInputStream.truncate()


            new RootInputStream(new ByteArrayInputStream(s.getBytes()));
        assertEquals(s.charAt(0), (char) is.read());
        assertEquals(s.charAt(1), (char) is.read());
        assertEquals(s.charAt(2), (char) is.read());
        assertEquals(s.charAt(3), (char) is.read());
        is.truncate();
        assertEquals(-1, is.read());
        byte[] buf = new byte[100];
        assertEquals(-1, is.read(buf));
        assertEquals(-1, is.read(buf, 2, 5));
    }
View Full Code Here


            new RootInputStream(new ByteArrayInputStream(s.getBytes()));
        assertEquals(s.charAt(0), (char) is.read());
        assertEquals(s.charAt(1), (char) is.read());
        assertEquals(s.charAt(2), (char) is.read());
        assertEquals(s.charAt(3), (char) is.read());
        is.truncate();
        assertEquals(-1, is.read());
        byte[] buf = new byte[100];
        assertEquals(-1, is.read(buf));
        assertEquals(-1, is.read(buf, 2, 5));
    }
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.