Class BoundedReader
java.lang.Object
java.io.Reader
org.apache.maven.shared.filtering.BoundedReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
A reader that imposes a limit to the number of bytes that can be read from an underlying reader, simulating eof when
this limit is reached. This stream can typically be used to constrain a client with regard to a readAheadLimit of an
underlying stream, to avoid overrunning this limit and hence lose the opportunity do to reset.
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class java.io.Reader
markSupported, nullReader, read, read, ready, skip, transferTo
-
Constructor Details
-
BoundedReader
- Parameters:
target
-Reader
readAheadLimit
- read ahead limit.- Throws:
IOException
- in case of a failure.
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classReader
- Throws:
IOException
-
reset
- Overrides:
reset
in classReader
- Throws:
IOException
-
mark
- Overrides:
mark
in classReader
- Throws:
IOException
-
read
- Overrides:
read
in classReader
- Throws:
IOException
-
read
- Specified by:
read
in classReader
- Throws:
IOException
-