Package crawlercommons.sitemaps
Class SkipLeadingWhiteSpaceInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.apache.commons.io.input.ProxyInputStream
-
- crawlercommons.sitemaps.SkipLeadingWhiteSpaceInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class SkipLeadingWhiteSpaceInputStream extends org.apache.commons.io.input.ProxyInputStream
Wraps a stream and skips over leading whitespace (at beginning of file) in the wrapped stream. The wrapped stream must support to mark the current position (seeInputStream.mark(int)
. Only ASCII whitespace (space/U+0020,\t
/U+0009,\n
/U+000A, vertical tab/U+000b,\r
/U+000D) is skipped.
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description SkipLeadingWhiteSpaceInputStream(InputStream proxy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
beforeRead(int n)
-
Methods inherited from class org.apache.commons.io.input.ProxyInputStream
afterRead, available, close, handleIOException, mark, markSupported, read, read, read, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
SkipLeadingWhiteSpaceInputStream
public SkipLeadingWhiteSpaceInputStream(InputStream proxy)
-
-
Method Detail
-
beforeRead
protected void beforeRead(int n) throws IOException
- Overrides:
beforeRead
in classorg.apache.commons.io.input.ProxyInputStream
- Throws:
IOException
-
-