net.sourceforge.pmd.util.datasource
Class FileDataSource
java.lang.Object
net.sourceforge.pmd.util.datasource.FileDataSource
- All Implemented Interfaces:
- DataSource
public class FileDataSource
- extends Object
- implements DataSource
DataSource implementation to read data from a file.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileDataSource
public FileDataSource(File file)
- Parameters:
file
- the file to read
getInputStream
public InputStream getInputStream()
throws IOException
- Description copied from interface:
DataSource
- Get an InputStream on the source file.
- Specified by:
getInputStream
in interface DataSource
- Returns:
- the InputStream reading the source file
- Throws:
IOException
- if the file can't be opened
getNiceFileName
public String getNiceFileName(boolean shortNames,
String inputFileName)
- Description copied from interface:
DataSource
- Return a nice version of the filename.
- Specified by:
getNiceFileName
in interface DataSource
- Parameters:
shortNames
- true if short names are being usedinputFileName
- name of a "master" file this file is relative to
- Returns:
- String
Copyright © 2002-2016 InfoEther. All Rights Reserved.