Package org.eclipse.jgit.merge
Class EolAwareOutputStream
java.lang.Object
java.io.OutputStream
org.eclipse.jgit.merge.EolAwareOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
An output stream which is aware of newlines and can be asked to begin a new
line if not already in one.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, write
-
Field Details
-
out
-
bol
private boolean bol
-
-
Constructor Details
-
EolAwareOutputStream
EolAwareOutputStream(OutputStream out) Initialize a new EOL aware stream.- Parameters:
out
- stream to output all writes to.
-
-
Method Details
-
beginln
Begin a new line if not already in one.- Throws:
IOException
- if an I/O error occurs.
-
isBeginln
boolean isBeginln()- Returns:
- true if a new line has just begun.
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-