- 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
public static class ObjectStream.Filter extends 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
-
-
Constructor Summary
Constructors Constructor Description Filter(int type, long size, InputStream in)Create a filter stream for an object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()longgetSize()Get total size of object in bytesintgetType()Get Git object type, seeConstants.voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] b, int off, int len)voidreset()longskip(long n)-
Methods inherited from class java.io.InputStream
nullInputStream, read, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
Filter
public Filter(int type, long size, InputStream in)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 Detail
-
getType
public int getType()
Description copied from class:ObjectStreamGet Git object type, seeConstants.- Specified by:
getTypein classObjectStream- Returns:
- Git object type, see
Constants.
-
getSize
public long getSize()
Description copied from class:ObjectStreamGet total size of object in bytes- Specified by:
getSizein classObjectStream- Returns:
- total size of object in bytes
-
available
public int available() throws IOException- Overrides:
availablein classInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Overrides:
skipin classInputStream- Throws:
IOException
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classInputStream
-
mark
public void mark(int readlimit)
- Overrides:
markin classInputStream
-
reset
public void reset() throws IOException- Overrides:
resetin classInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
-