public class CRLFOutputStream extends FilterOutputStream
| Modifier and Type | Field and Description |
|---|---|
static int |
CR
The CR octet.
|
static byte[] |
CRLF
The CR/LF pair.
|
protected int |
last
The last byte read.
|
static int |
LF
The LF octet.
|
out| Constructor and Description |
|---|
CRLFOutputStream(OutputStream out)
Constructs a CR/LF output stream connected to the specified output stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
write(byte[] b)
Writes a byte array to the underlying stream.
|
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.
|
void |
write(String text)
Writes the specified ASCII string to the underlying stream.
|
void |
writeln()
Writes a newline to the underlying stream.
|
close, flushpublic static final int CR
public static final int LF
public static final byte[] CRLF
protected int last
public CRLFOutputStream(OutputStream out)
public void write(int ch)
throws IOException
write in class FilterOutputStreamIOException - if an I/O error occurredpublic void write(byte[] b)
throws IOException
write in class FilterOutputStreamIOException - if an I/O error occurredpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class FilterOutputStreamIOException - if an I/O error occurredpublic void write(String text) throws IOException
IOException - if an I/O error occurredpublic void writeln()
throws IOException
IOException - if an I/O error occurredCopyright © 2017. All rights reserved.