public static class ObjectStream.SmallStream extends ObjectStream
ObjectLoader implementations can use this stream type when the object's content is small enough to be accessed as a single byte array, but the application has still requested it in stream format.
ObjectStream.Filter, ObjectStream.SmallStream
Constructor and Description |
---|
SmallStream(int type,
byte[] data)
Create the stream from an existing byte array and type.
|
SmallStream(ObjectLoader loader)
Create the stream from an existing loader's cached bytes.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
long |
getSize()
Get total size of object in bytes
|
int |
getType()
Get Git object type, see
Constants . |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
long |
skip(long n) |
close, read
public SmallStream(ObjectLoader loader)
loader
- the loader.public SmallStream(int type, byte[] data)
type
- the type constant for the object.data
- the fully inflated content of the object.public int getType()
ObjectStream
Constants
.getType
in class ObjectStream
Constants
.public long getSize()
ObjectStream
getSize
in class ObjectStream
public int available()
available
in class InputStream
public long skip(long n)
skip
in class InputStream
public int read()
read
in class InputStream
public int read(byte[] b, int off, int len)
read
in class InputStream
public boolean markSupported()
markSupported
in class InputStream
public void mark(int readlimit)
mark
in class InputStream
public void reset()
reset
in class InputStream
Copyright © 2019 Eclipse JGit Project. All rights reserved.