|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pmd.FileDataSource
public class FileDataSource
DataSource implementation to read data from a file.
Constructor Summary | |
---|---|
FileDataSource(java.io.File file)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileDataSource(java.io.File file)
file
- the file to readMethod Detail |
---|
public 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 to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |