Class FSEditLogLoader.PositionTrackingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.PositionTrackingInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
- FSEditLogLoader
Stream wrapper that keeps track of the current stream position.
This stream also allows us to set a limit on how many bytes we can read
without getting an exception.
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, close, markSupportedMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
PositionTrackingInputStream
-
-
Method Details
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
setLimit
public void setLimit(long limit) -
clearLimit
public void clearLimit() -
mark
public void mark(int limit) - Overrides:
markin classFilterInputStream
-
reset
- Overrides:
resetin classFilterInputStream- Throws:
IOException
-
getPos
public long getPos() -
skip
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-