Package liquibase.io
Class EmptyLineAndCommentSkippingInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- java.io.BufferedInputStream
-
- liquibase.io.EmptyLineAndCommentSkippingInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class EmptyLineAndCommentSkippingInputStream extends BufferedInputStream
Input stream that does not read (skips) lines starting withcommentPattern
and line endings.read()
method will not return either line endings or commented lines.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_CHAR_SIZE_IN_BYTES
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description EmptyLineAndCommentSkippingInputStream(InputStream in, String commentLineStartsWith)
Creates Input stream that does not read (skips) lines starting withcommentLineStartsWith
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
read()
-
Methods inherited from class java.io.BufferedInputStream
available, close, mark, markSupported, read, reset, skip
-
Methods inherited from class java.io.FilterInputStream
read
-
-
-
-
Field Detail
-
MAX_CHAR_SIZE_IN_BYTES
public static final int MAX_CHAR_SIZE_IN_BYTES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EmptyLineAndCommentSkippingInputStream
public EmptyLineAndCommentSkippingInputStream(InputStream in, String commentLineStartsWith)
Creates Input stream that does not read (skips) lines starting withcommentLineStartsWith
- Parameters:
in
- original input streamcommentLineStartsWith
- comment line pattern (if empty or null, comments will not be enabled)
-
-
Method Detail
-
read
public int read() throws IOException
- Overrides:
read
in classBufferedInputStream
- Throws:
IOException
-
-