Package org.apache.james.mime4j.io

Examples of org.apache.james.mime4j.io.EOLConvertingInputStream


   
    private void testConvertLF(String s1, String s2) throws IOException {
        byte[] bytes = new byte[1024];
       
        ByteArrayInputStream bais = new ByteArrayInputStream(fromString(s1));
        EOLConvertingInputStream in =
            new EOLConvertingInputStream(bais,
                        EOLConvertingInputStream.CONVERT_LF);
        int n = in.read(bytes);
        assertEquals(s2, toString(bytes, n));
    }
View Full Code Here


    private void testConvertBoth(String s1, String s2) throws IOException {
        byte[] bytes = new byte[1024];
       
        ByteArrayInputStream bais = new ByteArrayInputStream(fromString(s1));
        EOLConvertingInputStream in =
            new EOLConvertingInputStream(bais,
                        EOLConvertingInputStream.CONVERT_BOTH);
        int n = in.read(bytes);
        assertEquals(s2, toString(bytes, n));
    }
View Full Code Here

   
    private void testConvertCR(String s1, String s2) throws IOException {
        byte[] bytes = new byte[1024];
       
        ByteArrayInputStream bais = new ByteArrayInputStream(fromString(s1));
        EOLConvertingInputStream in =
            new EOLConvertingInputStream(bais,
                        EOLConvertingInputStream.CONVERT_CR);
        int n = in.read(bytes);
        assertEquals(s2, toString(bytes, n));
    }
View Full Code Here

   
    private void testConvertLF(String s1, String s2) throws IOException {
        byte[] bytes = new byte[1024];
       
        ByteArrayInputStream bais = new ByteArrayInputStream(fromString(s1));
        EOLConvertingInputStream in =
            new EOLConvertingInputStream(bais,
                        EOLConvertingInputStream.CONVERT_LF);
        int n = in.read(bytes);
        assertEquals(s2, toString(bytes, n));
    }
View Full Code Here

TOP

Related Classes of org.apache.james.mime4j.io.EOLConvertingInputStream

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.