|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jacoco.report.InputStreamSourceFileLocator
public abstract class InputStreamSourceFileLocator
Abstract base class for ISourceFileLocator
locator implementations
based on InputStream
s. It handles the encoding and tab width.
Constructor Summary | |
---|---|
protected |
InputStreamSourceFileLocator(String encoding,
int tabWidth)
Creates a new locator with the given specification. |
Method Summary | |
---|---|
Reader |
getSourceFile(String packageName,
String fileName)
Tries to locate the given source file and opens a reader with the appropriate encoding. |
protected abstract InputStream |
getSourceStream(String path)
Tries to locate the given source file and opens its binary content. |
int |
getTabWidth()
Returns number of blank characters that represent a tab in source code. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected InputStreamSourceFileLocator(String encoding, int tabWidth)
encoding
- encoding of the source files, null
for platform
default encodingtabWidth
- tab width in source files as number of blanksMethod Detail |
---|
public Reader getSourceFile(String packageName, String fileName) throws IOException
ISourceFileLocator
getSourceFile
in interface ISourceFileLocator
packageName
- VM name of the packagefileName
- name of the source file
null
otherwise
IOException
- in case of problems while opening the filepublic int getTabWidth()
ISourceFileLocator
getTabWidth
in interface ISourceFileLocator
protected abstract InputStream getSourceStream(String path) throws IOException
path
- local path to the resource
null
otherwise
IOException
- in case of problems while opening the stream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |