: Class MessageOutputStream

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## dog.mail.util
Class MessageOutputStream

    java.lang.Object
      |
      +--java.io.OutputStream
            |
            +--java.io.FilterOutputStream
                  |
                  +--dog.mail.util.MessageOutputStream

public class MessageOutputStream
extends java.io.FilterOutputStream

An output stream that escapes any dots on a line by themself with another dot, for the purposes of sending messages to SMTP and NNTP servers.

Field Summary
`static int` | `END` The stream termination octet.
`static int` | `LF` The line termination octet.

Fields inherited from class java.io.FilterOutputStream
`out`

Constructor Summary
`MessageOutputStream(java.io.OutputStream out)` Constructs a message output stream connected to the specified output stream.

Method Summary
`void` | `write(byte[] b, int off, int len)` Writes a portion of a byte array to the underlying stream.
`void` | `write(int ch)` Writes a character to the underlying stream.

Methods inherited from class java.io.FilterOutputStream
`close, flush, write`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### END

    public static final int END

  The stream termination octet.

### LF

    public static final int LF

  The line termination octet.

Constructor Detail

### MessageOutputStream

    public MessageOutputStream(java.io.OutputStream out)

  Constructs a message output stream connected to the specified output stream.
  Parameters:
    `out` - the target output stream

Method Detail

### write

    public void write(int ch)
               throws java.io.IOException

  Writes a character to the underlying stream.
  Throws:
    java.io.IOException - if an I/O error occurred
  Overrides:
    write in class java.io.FilterOutputStream

### write

    public void write(byte[] b,
                      int off,
                      int len)
               throws java.io.IOException

  Writes a portion of a byte array to the underlying stream.
  Throws:
    java.io.IOException - if an I/O error occurred
  Overrides:
    write in class java.io.FilterOutputStream

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD