public abstract class InputStreamSourceFileLocator extends Object implements ISourceFileLocator
ISourceFileLocator locator implementations
based on InputStreams. It handles the encoding and tab width.| Modifier | Constructor and Description |
|---|---|
protected |
InputStreamSourceFileLocator(String encoding,
int tabWidth)
Creates a new locator with the given specification.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 blankspublic Reader getSourceFile(String packageName, String fileName) throws IOException
ISourceFileLocatorgetSourceFile in interface ISourceFileLocatorpackageName - VM name of the packagefileName - name of the source filenull otherwiseIOException - in case of problems while opening the filepublic int getTabWidth()
ISourceFileLocatorgetTabWidth in interface ISourceFileLocatorprotected abstract InputStream getSourceStream(String path) throws IOException
path - local path to the resourcenull otherwiseIOException - in case of problems while opening the streamCopyright © 2009-2015 Mountainminds GmbH & Co. KG. All Rights Reserved.