Class 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 (see InputStream.mark(int). Only ASCII whitespace (space/U+0020, \t/U+0009, \n /U+000A, vertical tab/U+000b, \r/U+000D) is skipped.
    • Constructor Detail

      • SkipLeadingWhiteSpaceInputStream

        public SkipLeadingWhiteSpaceInputStream​(InputStream proxy)
    • Method Detail

      • beforeRead

        protected void beforeRead​(int n)
                           throws IOException
        Overrides:
        beforeRead in class org.apache.commons.io.input.ProxyInputStream
        Throws:
        IOException