Package org.apache.jackrabbit.vault.util
Class LineOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.apache.jackrabbit.vault.util.LineOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class LineOutputStream extends OutputStream
Provides an output stream wrapper that detects line feed sequences and replaces them by new ones.
-
-
Field Summary
Fields Modifier and Type Field Description static byte[]
LS_BINARY
static byte[]
LS_NATIVE
static byte[]
LS_UNIX
static byte[]
LS_WINDOWS
-
Constructor Summary
Constructors Constructor Description LineOutputStream(OutputStream out, byte[] ls)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
void
flush(boolean addLF)
void
write(int b)
-
Methods inherited from class java.io.OutputStream
write, write
-
-
-
-
Constructor Detail
-
LineOutputStream
public LineOutputStream(OutputStream out, byte[] ls)
-
-
Method Detail
-
write
public void write(int b) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush(boolean addLF) throws IOException
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
-