public class DeprecatedDefaultInputFile extends DefaultInputFile implements InputFile
InputFile.Status, InputFile.TypemoduleBaseDir| Constructor and Description |
|---|
DeprecatedDefaultInputFile(String moduleKey,
String relativePath) |
| Modifier and Type | Method and Description |
|---|---|
File |
getFile()
Deprecated.
in 4.2. Use
DefaultInputFile.file() |
File |
getFileBaseDir()
Deprecated.
in 4.2. Replaced by
FileSystem.baseDir() |
InputStream |
getInputStream()
Get an
InputStream that reads from the file. |
String |
getRelativePath()
Deprecated.
in 4.2. Use
DefaultInputFile.relativePath() |
absolutePath, charset, equals, file, hashCode, key, language, lastValidOffset, lines, moduleKey, path, relativePath, setCharset, setLanguage, setLastValidOffset, setLines, setModuleBaseDir, setStatus, setType, status, toString, typepublic DeprecatedDefaultInputFile(String moduleKey, String relativePath)
@Deprecated public File getFileBaseDir()
FileSystem.baseDir()InputFileFor example in maven projects, the basedir of a source file stored in
src/main/java/org/foo/ is the directory src/main/java.
@Deprecated public File getFile()
DefaultInputFile.file()InputFile@Deprecated public String getRelativePath()
DefaultInputFile.relativePath()InputFile'/', 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.
public InputStream getInputStream() throws FileNotFoundException
InputFileInputStream 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–2015 SonarSource. All rights reserved.