Package com.sun.mail.util

# Class LineOutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.sun.mail.util.LineOutputStream

All Implemented Interfaces:
  `Closeable`, `Flushable`, `AutoCloseable`

public class LineOutputStream extends FilterOutputStream
This class is to support writing out Strings as a sequence of bytes terminated by a CRLF sequence. The String must contain only US-ASCII characters.

The expected use is to write out RFC822 style headers to an output stream.

Author:
  John Mani, Bill Shannon

## Field Summary

### Fields inherited from class java.io.FilterOutputStream

`out`

## Constructor Summary

Constructors
Constructor
Description
`LineOutputStream(OutputStream out)`
`LineOutputStream(OutputStream out, boolean allowutf8)`

## Method Summary

Modifier and Type
Method
Description
`void`
`writeln()`
`void`
`writeln(String s)`

### Methods inherited from class java.io.FilterOutputStream

`close, flush, write, write, write`

### Methods inherited from class java.io.OutputStream

`nullOutputStream`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### LineOutputStream

public LineOutputStream(OutputStream out)

### LineOutputStream

public LineOutputStream(OutputStream out, boolean allowutf8)

Parameters:
  `out` - the OutputStream
  `allowutf8` - allow UTF-8 characters?
Since:
  JavaMail 1.6

## Method Details

### writeln

public void writeln(String s) throws IOException

Throws:
  `IOException`

### writeln

public void writeln() throws IOException

Throws:
  `IOException`