InputFile
@Deprecated public interface InputFile
Modifier and Type | Method and Description |
---|---|
File |
getFile()
Deprecated.
Get the underlying file.
|
File |
getFileBaseDir()
Deprecated.
The source base directory, different than the project basedir.
|
InputStream |
getInputStream()
Deprecated.
Get an
InputStream that reads from the file. |
String |
getRelativePath()
Deprecated.
Path relative to basedir.
|
File getFileBaseDir()
For example in maven projects, the basedir of a source file stored in
src/main/java/org/foo/
is the directory src/main/java
.
String getRelativePath()
'/'
, whatever the platform.
Example on windows: if file basedir is c:\project\src\
and file is c:\project\src\org\foo\Bar.java
, then relative path
is org/foo/Bar.java
Example on unix: if file basedir is /project/src
and file is /project/src/org/foo/Bar.java
, then relative path
is org/foo/Bar.java
as well.
InputStream getInputStream() throws FileNotFoundException
InputStream
that reads from the file.
The returned stream is buffered so there is no need to use a
BufferedInputStream
FileNotFoundException
- if the file is not foundCopyright © 2009–2016 SonarSource. All rights reserved.