org.apache.james.util
Class ExtraDotOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--org.apache.james.util.ExtraDotOutputStream

public class ExtraDotOutputStream
extends FilterOutputStream

Adds extra dot if dot occurs in message body at beginning of line (according to RFC1939) Compare also org.apache.james.smtpserver.SMTPInputStream

Author:
Stephan Schiessling

Field Summary
protected  int countLast0A0D
          Counter for number of last (0A or 0D).
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
ExtraDotOutputStream(OutputStream out)
          Constructor that wraps an OutputStream.
 
Method Summary
 void write(int b)
          Writes a byte to the stream, adding dots where appropriate.
 
Methods inherited from class java.io.FilterOutputStream
close, flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

countLast0A0D

protected int countLast0A0D
Counter for number of last (0A or 0D).

Constructor Detail

ExtraDotOutputStream

public ExtraDotOutputStream(OutputStream out)
Constructor that wraps an OutputStream.

Parameters:
out - the OutputStream to be wrapped
Method Detail

write

public void write(int b)
           throws IOException
Writes a byte to the stream, adding dots where appropriate.

Overrides:
write in class FilterOutputStream
Parameters:
b - the byte to write
Throws:
IOException - if an error occurs writing the byte


"Copyright © 1999-2002 Apache Jakarta Project. All Rights Reserved."