Package org.eclipse.jgit.lib
Class ObjectStream.Filter
java.lang.Object
java.io.InputStream
org.eclipse.jgit.lib.ObjectStream
org.eclipse.jgit.lib.ObjectStream.Filter
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
ObjectStream
Simple filter stream around another stream.
ObjectLoader implementations can use this stream type when the object's content is available from a standard InputStream.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jgit.lib.ObjectStream
ObjectStream.Filter, ObjectStream.SmallStream
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFilter
(int type, long size, InputStream in) Create a filter stream for an object. -
Method Summary
Methods inherited from class java.io.InputStream
read
-
Field Details
-
type
private final int type -
size
private final long size -
in
-
-
Constructor Details
-
Filter
Create a filter stream for an object.- Parameters:
type
- the type of the object.size
- total size of the object, in bytes.in
- stream the object's raw data is available from. This stream should be buffered with some reasonable amount of buffering.
-
-
Method Details
-
getType
public int getType()Description copied from class:ObjectStream
Get Git object type, seeConstants
.- Specified by:
getType
in classObjectStream
- Returns:
- Git object type, see
Constants
.
-
getSize
public long getSize()Description copied from class:ObjectStream
Get total size of object in bytes- Specified by:
getSize
in classObjectStream
- Returns:
- total size of object in bytes
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
mark
public void mark(int readlimit) - Overrides:
mark
in classInputStream
-
reset
- Overrides:
reset
in classInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-