public static final class LfsFactory.LfsInputStream extends InputStream
InputStream
along with the
expected stream content length.Constructor and Description |
---|
LfsInputStream(InputStream stream,
long length)
Create a new wrapper around a certain stream
|
LfsInputStream(TemporaryBuffer buffer)
Create a new wrapper around a temporary buffer.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
getLength() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
available, mark, markSupported, read, reset, skip
public LfsInputStream(InputStream stream, long length)
stream
- the stream to wrap. the stream will be closed on
close()
.length
- the expected length of the streampublic LfsInputStream(TemporaryBuffer buffer) throws IOException
buffer
- the buffer to initialize stream and length from. The
buffer will be destroyed on close()
IOException
- in case of an error opening the stream to the buffer.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public long getLength()
Copyright © 2019 Eclipse JGit Project. All rights reserved.