Package org.eclipse.jgit.util.io
Class BinaryHunkInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.eclipse.jgit.util.io.BinaryHunkInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class BinaryHunkInputStream extends java.io.InputStream
A stream that decodes git binary patch data on the fly.- Since:
- 5.12
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
buffer
private java.io.InputStream
in
private int
lineNumber
private int
pos
-
Constructor Summary
Constructors Constructor Description BinaryHunkInputStream(java.io.InputStream in)
Creates a newBinaryHunkInputStream
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
private void
fillBuffer()
int
read()
int
read(byte[] b, int off, int len)
-
-
-
Constructor Detail
-
BinaryHunkInputStream
public BinaryHunkInputStream(java.io.InputStream in)
Creates a newBinaryHunkInputStream
.- Parameters:
in
-InputStream
to read the base-85 encoded patch data from
-
-
Method Detail
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- 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.InputStream
- Throws:
java.io.IOException
-
fillBuffer
private void fillBuffer() throws java.io.IOException
- Throws:
java.io.IOException
-
-