gnu.inet.util

Class MessageOutputStream


public class MessageOutputStream
extends 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.

Constructor Summary

MessageOutputStream(OutputStream out)
Constructs a message output stream connected to the specified output stream.

Method Summary

void
write(byte[] bytes)
void
write(byte[] bytes, int off, int len)
Block write.
void
write(int c)
Character write.

Field Details

END

public static final int END
The stream termination octet.
Field Value:
46

LF

public static final int LF
The line termination octet.
Field Value:
10

Constructor Details

MessageOutputStream

public MessageOutputStream(OutputStream out)
Constructs a message output stream connected to the specified output stream.
Parameters:
out - the target output stream

Method Details

write

public void write(byte[] bytes)
            throws IOException

write

public void write(byte[] bytes,
                  int off,
                  int len)
            throws IOException
Block write.

write

public void write(int c)
            throws IOException
Character write.