Examples of checkCRLFTerminator()


Examples of org.apache.james.util.ExtraDotOutputStream.checkCRLFTerminator()

                        OutputStream nouts = new BytesWrittenResetOutputStream(edouts,
                                                                  theWatchdog,
                                                                  theConfigData.getResetLength());
                        mc.getMessage().writeTo(nouts);
                        nouts.flush();
                        edouts.checkCRLFTerminator();
                        edouts.flush();
                    } finally {
                        out.println(".");
                        out.flush();
                    }
View Full Code Here

Examples of org.apache.james.util.ExtraDotOutputStream.checkCRLFTerminator()

                        OutputStream nouts = new BytesWrittenResetOutputStream(edouts,
                                                                  theWatchdog,
                                                                  theConfigData.getResetLength());
                        writeMessageContentTo(mc.getMessage(),nouts,lines);
                        nouts.flush();
                        edouts.checkCRLFTerminator();
                        edouts.flush();
                    } finally {
                        out.println(".");
                        out.flush();
                    }
View Full Code Here

Examples of org.apache.james.util.ExtraDotOutputStream.checkCRLFTerminator()

                        OutputStream nouts = new BytesWrittenResetOutputStream(edouts,
                                                                  theWatchdog,
                                                                  theConfigData.getResetLength());
                        mc.getMessage().writeTo(nouts);
                        nouts.flush();
                        edouts.checkCRLFTerminator();
                        edouts.flush();
                    } finally {
                        out.println(".");
                        out.flush();
                    }
View Full Code Here

Examples of org.apache.james.util.ExtraDotOutputStream.checkCRLFTerminator()

                        OutputStream nouts = new BytesWrittenResetOutputStream(edouts,
                                                                  theWatchdog,
                                                                  theConfigData.getResetLength());
                        writeMessageContentTo(mc.getMessage(),nouts,lines);
                        nouts.flush();
                        edouts.checkCRLFTerminator();
                        edouts.flush();
                    } finally {
                        out.println(".");
                        out.flush();
                    }
View Full Code Here

Examples of org.apache.james.util.stream.CRLFOutputStream.checkCRLFTerminator()

     */
    public void testCheckCRLFTerminator() throws IOException {
        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
        CRLFOutputStream os = new CRLFOutputStream(bOut);
        // if the stream is empty then we should not add the CRLF.
        os.checkCRLFTerminator();
        os.flush();
        assertEquals("",bOut.toString());
        os.write("Test".getBytes());
        os.flush();
        assertEquals("Test",bOut.toString());
View Full Code Here

Examples of org.apache.james.util.stream.CRLFOutputStream.checkCRLFTerminator()

        os.flush();
        assertEquals("",bOut.toString());
        os.write("Test".getBytes());
        os.flush();
        assertEquals("Test",bOut.toString());
        os.checkCRLFTerminator();
        os.flush();
        assertEquals("Test\r\n",bOut.toString());
        // if the stream ends with \r we should simply add the \n
        os.write("A line with incomplete ending\r".getBytes());
        os.checkCRLFTerminator();
View Full Code Here

Examples of org.apache.james.util.stream.CRLFOutputStream.checkCRLFTerminator()

        os.checkCRLFTerminator();
        os.flush();
        assertEquals("Test\r\n",bOut.toString());
        // if the stream ends with \r we should simply add the \n
        os.write("A line with incomplete ending\r".getBytes());
        os.checkCRLFTerminator();
        os.flush();
        assertEquals("Test\r\nA line with incomplete ending\r\n",bOut.toString());
        // already correctly terminated, should leave the output untouched
        os.checkCRLFTerminator();
        os.flush();
View Full Code Here

Examples of org.apache.james.util.stream.CRLFOutputStream.checkCRLFTerminator()

        os.write("A line with incomplete ending\r".getBytes());
        os.checkCRLFTerminator();
        os.flush();
        assertEquals("Test\r\nA line with incomplete ending\r\n",bOut.toString());
        // already correctly terminated, should leave the output untouched
        os.checkCRLFTerminator();
        os.flush();
        assertEquals("Test\r\nA line with incomplete ending\r\n",bOut.toString());
    }
   
    public void testMixedSizeChunks() throws IOException {
View Full Code Here

Examples of org.apache.james.util.stream.ExtraDotOutputStream.checkCRLFTerminator()

     */
    public void testCheckCRLFTerminator() throws IOException {
        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
        ExtraDotOutputStream os = new ExtraDotOutputStream(bOut);
        // if the stream is empty then we should not add the CRLF.
        os.checkCRLFTerminator();
        os.flush();
        assertEquals("",bOut.toString());
        os.write("Test".getBytes());
        os.flush();
        assertEquals("Test",bOut.toString());
View Full Code Here

Examples of org.apache.james.util.stream.ExtraDotOutputStream.checkCRLFTerminator()

        os.flush();
        assertEquals("",bOut.toString());
        os.write("Test".getBytes());
        os.flush();
        assertEquals("Test",bOut.toString());
        os.checkCRLFTerminator();
        os.flush();
        assertEquals("Test\r\n",bOut.toString());
        // if the stream ends with \r we should simply add the \n
        os.write("A line with incomplete ending\r".getBytes());
        os.flush();
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.