Class LfsFactory.LfsInputStream

java.lang.Object
java.io.InputStream
org.eclipse.jgit.util.LfsFactory.LfsInputStream
All Implemented Interfaces:
Closeable, AutoCloseable
Enclosing class:
LfsFactory

public static final class LfsFactory.LfsInputStream extends InputStream
Encapsulate a potentially exchanged InputStream along with the expected stream content length.
  • Field Details

    • stream

      private InputStream stream
      The actual stream.
    • length

      private long length
      The expected stream content length.
  • Constructor Details

    • LfsInputStream

      public LfsInputStream(InputStream stream, long length)
      Create a new wrapper around a certain stream
      Parameters:
      stream - the stream to wrap. the stream will be closed on close().
      length - the expected length of the stream
    • LfsInputStream

      public LfsInputStream(TemporaryBuffer buffer) throws IOException
      Create a new wrapper around a temporary buffer.
      Parameters:
      buffer - the buffer to initialize stream and length from. The buffer will be destroyed on close()
      Throws:
      IOException - in case of an error opening the stream to the buffer.
  • Method Details