public class FileDataSource extends Object implements DataSource
Constructor and Description |
---|
FileDataSource(File file) |
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStream()
Get an InputStream on the source file.
|
String |
getNiceFileName(boolean shortNames,
String inputFileName)
Return a nice version of the filename.
|
public FileDataSource(File file)
file
- the file to readpublic InputStream getInputStream() throws IOException
DataSource
getInputStream
in interface DataSource
IOException
- if the file can't be openedpublic String getNiceFileName(boolean shortNames, String inputFileName)
DataSource
getNiceFileName
in interface DataSource
shortNames
- true if short names are being usedinputFileName
- name of a "master" file this file is relative toCopyright © 2002-2017 PMD. All Rights Reserved.