Package com.aoindustries.util
Class CommentCaptureInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.aoindustries.util.CommentCaptureInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class CommentCaptureInputStream extends InputStream
Captures comments from any lines that begin with # (preceding space, tab, and formfeed allowed).This class is optimized for reading
Propertiesfiles and assumes ISO-8859-1 encoding.Java 1.9: Read properties files via
Readerin UTF-8 format- Author:
- AO Industries, Inc.
-
-
Constructor Summary
Constructors Constructor Description CommentCaptureInputStream(InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()List<String>getComments()intread()-
Methods inherited from class java.io.InputStream
mark, markSupported, read, read, reset, skip
-
-
-
-
Constructor Detail
-
CommentCaptureInputStream
public CommentCaptureInputStream(InputStream in)
-
-
Method Detail
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
available
public int available() throws IOException- Overrides:
availablein classInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
-