Class LengthInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.hadoop.hdfs.server.datanode.fsdataset.LengthInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
An input stream with length.
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skipMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
LengthInputStream
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
-