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
- 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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectStream.Filter
public ObjectStream.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.
getType
public int getType()
- Specified by:
getType
in class ObjectStream
- Returns:
- Git object type, see
Constants
.
getSize
public long getSize()
- Specified by:
getSize
in class ObjectStream
- Returns:
- total size of object in bytes
available
public int available()
throws IOException
- Overrides:
available
in class InputStream
- Throws:
IOException
skip
public long skip(long n)
throws IOException
- Overrides:
skip
in class InputStream
- Throws:
IOException
read
public int read()
throws IOException
- Specified by:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
markSupported
public boolean markSupported()
- Overrides:
markSupported
in class InputStream
mark
public void mark(int readlimit)
- Overrides:
mark
in class InputStream
reset
public void reset()
throws IOException
- Overrides:
reset
in class InputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class InputStream
- Throws:
IOException
Copyright © 2013. All Rights Reserved.