Package org.spdx.tag
Class NoCommentInputStream
java.lang.Object
java.io.InputStream
org.spdx.tag.NoCommentInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
public class NoCommentInputStream extends InputStream
- Author:
- Gary O'Neall
Input stream which filters out any SPDX tag/value comments
Any new line which begins with a # is skipped until the end of line except
if it is within a
wrapper
-
Constructor Summary
Constructors Constructor Description NoCommentInputStream(InputStream in) -
Method Summary
Modifier and Type Method Description voidclose()intgetCurrentLineNo()Searches for the string in the file stored in FileLine and returns the line no.intread()StringreadLine()Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
NoCommentInputStream
- Parameters:
in- Input stream containing the commented data- Throws:
IOException
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
getCurrentLineNo
public int getCurrentLineNo()Searches for the string in the file stored in FileLine and returns the line no. if found.- Parameters:
string- to be searched in the file
-
readLine
- Throws:
IOException
-