org.apache.hadoop.hdfs.server.datanode.fsdataset
Class LengthInputStream

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

public class LengthInputStream
extends FilterInputStream

An input stream with length.


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
LengthInputStream(InputStream in, long length)
          Create an stream.
 
Method Summary
 long getLength()
           
 InputStream getWrappedStream()
           
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LengthInputStream

public LengthInputStream(InputStream in,
                         long length)
Create an stream.

Parameters:
in - the underlying input stream.
length - the length of the stream.
Method Detail

getLength

public long getLength()
Returns:
the length.

getWrappedStream

public InputStream getWrappedStream()


Copyright © 2014 Apache Software Foundation. All Rights Reserved.