Class ReaderDataSource
- java.lang.Object
-
- net.sourceforge.pmd.util.datasource.internal.AbstractDataSource
-
- net.sourceforge.pmd.util.datasource.ReaderDataSource
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,DataSource
@Deprecated public class ReaderDataSource extends net.sourceforge.pmd.util.datasource.internal.AbstractDataSource
Deprecated.DataSource implementation to read data from a Reader.
-
-
Constructor Summary
Constructors Constructor Description ReaderDataSource(Reader reader, String dataSourceName)
Deprecated.Create the DataSource from the Reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getDataSourceName()
Deprecated.InputStream
getInputStream()
Deprecated.Convert the Reader into an InputStream.String
getNiceFileName(boolean shortNames, String inputFileName)
Deprecated.Return the dataSourceName via theDataSource
Interface method.void
setDataSourceName(String dataSourceName)
Deprecated.String
toString()
Deprecated.
-
-
-
Method Detail
-
getInputStream
public InputStream getInputStream() throws IOException
Deprecated.Convert the Reader into an InputStream.Note: This uses the default encoding.
- Returns:
- Derived InputStream
- Throws:
IOException
-
getNiceFileName
public String getNiceFileName(boolean shortNames, String inputFileName)
Deprecated.Return the dataSourceName via theDataSource
Interface method.Both the parameters are ignored
- Parameters:
shortNames
- ignoredinputFileName
- ignored- Returns:
-
getDataSourceName
public String getDataSourceName()
Deprecated.- Returns:
- the dataSourceName
-
setDataSourceName
public void setDataSourceName(String dataSourceName)
Deprecated.- Parameters:
dataSourceName
- the dataSourceName to set
-
-