Package org.apache.jackrabbit.vault.util
Class LineOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.apache.jackrabbit.vault.util.LineOutputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public class LineOutputStream extends java.io.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(java.io.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)
-
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOException
- Specified by:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
flush
public void flush(boolean addLF) throws java.io.IOException
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Overrides:
flush
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
-