Class LengthInputStream

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.hadoop.hdfs.server.datanode.fsdataset.LengthInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class LengthInputStream extends FilterInputStream
An input stream with length.
  • Constructor Details

    • LengthInputStream

      public LengthInputStream(InputStream in, long length)
      Create an stream.
      Parameters:
      in - the underlying input stream.
      length - the length of the stream.
  • Method Details

    • getLength

      public long getLength()
      Returns:
      the length.
    • getWrappedStream

      public InputStream getWrappedStream()