public class AutoLFOutputStream
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 |
---|
AutoLFOutputStream(java.io.OutputStream out)
Constructor for AutoLFOutputStream.
|
AutoLFOutputStream(java.io.OutputStream out,
boolean detectBinary)
Constructor for AutoLFOutputStream.
|
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 AutoLFOutputStream(java.io.OutputStream out)
Constructor for AutoLFOutputStream.
out
- an OutputStream
object.public AutoLFOutputStream(java.io.OutputStream out, boolean detectBinary)
Constructor for AutoLFOutputStream.
out
- an OutputStream
object.detectBinary
- whether binaries should be detectedpublic void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] b, int startOff, int startLen) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
private int buffer(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
private void decideMode() throws java.io.IOException
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException