Class FixedLengthStream

java.lang.Object
java.io.InputStream
io.bdeploy.common.util.FixedLengthStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class FixedLengthStream extends InputStream
An input stream that reads a given amount of bytes from a stream.
  • Constructor Details

    • FixedLengthStream

      public FixedLengthStream(InputStream in, long totalSize)
      Creates a new input stream that reads the given amount from the given stream.
      Parameters:
      in - the stream to read from
      totalSize - the number of bytes to read
  • Method Details