Examples of DotTerminatedInputStream


Examples of org.subethamail.smtp.io.DotTerminatedInputStream

    sess.sendResponse("354 End data with <CR><LF>.<CR><LF>");

    InputStream stream = sess.getRawInput();
    stream = new BufferedInputStream(stream, BUFFER_SIZE);
    stream = new DotTerminatedInputStream(stream);
    stream = new DotUnstuffingInputStream(stream);
    if (!sess.getServer().getDisableReceivedHeaders())
    {
      stream = new ReceivedHeaderStream(stream, sess.getHelo(), sess.getRemoteAddress().getAddress(), sess
          .getServer().getHostName(), sess.getServer().getSoftwareName(), sess.getSingleRecipient());
View Full Code Here

Examples of org.subethamail.smtp.io.DotTerminatedInputStream

{
  @Test
  public void testEmpty() throws IOException
  {
    InputStream in = new ByteArrayInputStream(".\r\n".getBytes("US-ASCII"));
    DotTerminatedInputStream stream = new DotTerminatedInputStream(in);
    assertEquals(-1, stream.read());
  }
View Full Code Here

Examples of org.subethamail.smtp.io.DotTerminatedInputStream

  @Test
  public void testPreserveLastCrLf() throws IOException
  {
    InputStream in = new ByteArrayInputStream("a\r\n.\r\n".getBytes("US-ASCII"));
    DotTerminatedInputStream stream = new DotTerminatedInputStream(in);
    assertEquals("a\r\n", readFull(stream));
  }
View Full Code Here

Examples of org.subethamail.smtp.io.DotTerminatedInputStream

  @Test
  public void testDotDot() throws IOException
  {
    InputStream in = new ByteArrayInputStream("..\r\n.\r\n".getBytes("US-ASCII"));
    DotTerminatedInputStream stream = new DotTerminatedInputStream(in);
    assertEquals("..\r\n", readFull(stream));
  }
View Full Code Here

Examples of org.subethamail.smtp.io.DotTerminatedInputStream

  @Test(expected = EOFException.class)
  public void testMissingDotLine() throws IOException
  {
    InputStream in = new ByteArrayInputStream("a\r\n".getBytes("US-ASCII"));
    DotTerminatedInputStream stream = new DotTerminatedInputStream(in);
    readFull(stream);
  }
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.