public class FileDataSource extends java.lang.Object implements DataSource
Constructor and Description |
---|
FileDataSource(java.io.File file) |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getInputStream()
Get an InputStream on the source file.
|
java.lang.String |
getNiceFileName(boolean shortNames,
java.lang.String inputFileName)
Return a nice version of the filename.
|
public FileDataSource(java.io.File file)
file
- the file to readpublic java.io.InputStream getInputStream() throws java.io.IOException
DataSource
getInputStream
in interface DataSource
java.io.IOException
- if the file can't be openedpublic java.lang.String getNiceFileName(boolean shortNames, java.lang.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–2018 PMD. All rights reserved.