public class AutoCRLFOutputStream
extends java.io.OutputStream
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
binbuf |
private int |
binbufcnt |
private int |
buf |
(package private) static int |
BUFFER_SIZE |
private boolean |
detectBinary |
private boolean |
isBinary |
private byte[] |
onebytebuf |
private java.io.OutputStream |
out |
| Constructor and Description |
|---|
AutoCRLFOutputStream(java.io.OutputStream out)
Constructor for AutoCRLFOutputStream.
|
AutoCRLFOutputStream(java.io.OutputStream out,
boolean detectBinary)
Constructor for AutoCRLFOutputStream.
|
| Modifier and Type | Method and Description |
|---|---|
private int |
buffer(byte[] b,
int off,
int len) |
void |
close() |
private void |
decideMode() |
void |
flush() |
void |
write(byte[] b) |
void |
write(byte[] b,
int startOff,
int startLen) |
void |
write(int b) |
static final int BUFFER_SIZE
private final java.io.OutputStream out
private int buf
private byte[] binbuf
private byte[] onebytebuf
private int binbufcnt
private boolean detectBinary
private boolean isBinary
public AutoCRLFOutputStream(java.io.OutputStream out)
Constructor for AutoCRLFOutputStream.
out - a OutputStream object.public AutoCRLFOutputStream(java.io.OutputStream out,
boolean detectBinary)
Constructor for AutoCRLFOutputStream.
out - a OutputStream object.detectBinary - whether binaries should be detectedpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int startOff,
int startLen)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionprivate int buffer(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionprivate void decideMode()
throws java.io.IOException
java.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException