Package org.eclipse.jgit.util.io
Class BinaryHunkOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.eclipse.jgit.util.io.BinaryHunkOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class BinaryHunkOutputStream extends OutputStream
AnOutputStream
that encodes data for a git binary patch.- Since:
- 5.12
-
-
Constructor Summary
Constructors Constructor Description BinaryHunkOutputStream(OutputStream out)
Creates a newBinaryHunkOutputStream
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Flushes and closes this stream, and closes the underlyingOutputStream
.void
flush()
Writes any buffered output as a binary patch line to the underlyingOutputStream
and flushes that stream, too.void
write(byte[] b, int off, int len)
void
write(int b)
-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Constructor Detail
-
BinaryHunkOutputStream
public BinaryHunkOutputStream(OutputStream out)
Creates a newBinaryHunkOutputStream
.- Parameters:
out
-OutputStream
to write the encoded data to
-
-
Method Detail
-
close
public void close() throws IOException
Flushes and closes this stream, and closes the underlyingOutputStream
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
Writes any buffered output as a binary patch line to the underlyingOutputStream
and flushes that stream, too.- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
write
public void write(int b) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
-