Package org.eclipse.jgit.merge
Class EolAwareOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.eclipse.jgit.merge.EolAwareOutputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
class EolAwareOutputStream extends java.io.OutputStream
An output stream which is aware of newlines and can be asked to begin a new line if not already in one.
-
-
Constructor Summary
Constructors Constructor Description EolAwareOutputStream(java.io.OutputStream out)
Initialize a new EOL aware stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
beginln()
Begin a new line if not already in one.(package private) boolean
isBeginln()
void
write(byte[] buf, int pos, int cnt)
void
write(int val)
-
-
-
Method Detail
-
beginln
void beginln() throws java.io.IOException
Begin a new line if not already in one.- Throws:
java.io.IOException
- if an I/O error occurs.
-
isBeginln
boolean isBeginln()
- Returns:
- true if a new line has just begun.
-
write
public void write(int val) throws java.io.IOException
- Specified by:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
write
public void write(byte[] buf, int pos, int cnt) throws java.io.IOException
- Overrides:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
-