Top Description Fields Constructors Methods
com.sun.mail.util

public Class CRLFOutputStream

extends FilterOutputStream
Class Inheritance
Known Direct Subclasses
com.sun.mail.smtp.SMTPOutputStream
Imports
java.io.*

Convert lines into the canonical format, that is, terminate lines with the CRLF sequence.
Author
John Mani

Field Summary

Modifier and TypeField and Description
protected boolean
protected int
private static final byte[]
Inherited from java.io.FilterOutputStream:
out

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
write(int
the byte.
b
)

Overrides java.io.FilterOutputStream.write.

Writes the specified byte to this output stream.
public void
write(byte[]
the data to be written.
b
)

Overrides java.io.FilterOutputStream.write.

Writes b.length bytes to this output stream.
public void
write(byte[]
the data.
b
,
int
the start offset in the data.
off
,
int
the number of bytes to write.
len
)

Overrides java.io.FilterOutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this output stream.
public void
Inherited from java.io.FilterOutputStream:
closeflush

Field Detail

atBOLback to summary
protected boolean atBOL
lastbback to summary
protected int lastb
newlineback to summary
private static final byte[] newline

Constructor Detail

CRLFOutputStreamback to summary
public CRLFOutputStream(OutputStream os)

Method Detail

writeback to summary
public void write(int b) throws IOException

Overrides java.io.FilterOutputStream.write.

Doc from java.io.FilterOutputStream.write.

Writes the specified byte to this output stream.

The write method of FilterOutputStream calls the write method of its underlying output stream, that is, it performs out.write(b).

Implements the abstract write method of OutputStream.

Parameters
b:int

the byte.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
writeback to summary
public void write(byte[] b) throws IOException

Overrides java.io.FilterOutputStream.write.

Doc from java.io.FilterOutputStream.write.

Writes b.length bytes to this output stream.

Parameters
b:byte[]

the data to be written.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
writeback to summary
public void write(byte[] b, int off, int len) throws IOException

Overrides java.io.FilterOutputStream.write.

Doc from java.io.FilterOutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this output stream.

Parameters
b:byte[]

the data.

off:int

the start offset in the data.

len:int

the number of bytes to write.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
writelnback to summary
public void writeln() throws IOException