public class EclipseClasspathFileReader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static int[] |
LOCATION_SEQUENCE_1 |
protected static int[] |
LOCATION_SEQUENCE_2 |
Constructor and Description |
---|
EclipseClasspathFileReader()
Initialize the new instance with no explicit workspace directory.
|
EclipseClasspathFileReader(java.lang.String workspacePath)
Initialize the new instance with an optional workspace directory.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
calculatePath(java.io.File projectDir,
java.lang.String pathName) |
protected java.util.List<EclipseClasspathEntry> |
extractClasspathEntries(java.io.File projectDir,
org.pfsw.six.Element classpathElement) |
protected java.lang.String |
getWorkspacePath() |
protected java.util.List<EclipseClasspathEntry> |
readClasspathEntries(java.io.File classpathFile)
Tries to read the .classpath file specified by the given parameter.
|
java.util.List<EclipseClasspathEntry> |
readClasspathEntries(java.lang.String projectLocation)
Tries to read the .classpath file at the given project location.
|
java.util.List<EclipseClasspathEntry> |
readClasspathEntriesFrom(java.lang.String classpathFilename)
Tries to read the specified .classpath file.
|
protected java.lang.String |
readDirFromLocationFile(java.io.File locationFile) |
protected boolean |
readExpectedSequence(java.io.InputStream stream,
int[] sequence)
Tries to read the given sequence of bytes from the stream.
|
protected java.lang.String |
readProjectPathFrom(java.io.InputStream stream)
This method reads from a binary file of which the format is unknown.
|
protected byte[] |
readToZero(java.io.InputStream stream)
Tries to read the next sequence as zero terminated string and returns it
as Java String assuming UTF-8 encoding.
|
protected java.lang.String |
readZeroTerminatedString(java.io.InputStream stream)
Tries to read the next sequence as zero terminated string and returns it
as Java String assuming UTF-8 encoding.
|
protected void |
setWorkspacePath(java.lang.String newValue) |
protected static final int[] LOCATION_SEQUENCE_1
protected static final int[] LOCATION_SEQUENCE_2
public EclipseClasspathFileReader()
public EclipseClasspathFileReader(java.lang.String workspacePath)
protected java.lang.String getWorkspacePath()
protected void setWorkspacePath(java.lang.String newValue)
public java.util.List<EclipseClasspathEntry> readClasspathEntries(java.lang.String projectLocation) throws java.io.IOException
projectLocation
- The file directory of the projectjava.io.IOException
- In any case of problem with reading the .classpath datapublic java.util.List<EclipseClasspathEntry> readClasspathEntriesFrom(java.lang.String classpathFilename) throws java.io.IOException
classpathFilename
- The path of the .classpath file to read injava.io.IOException
- In any case of problem with reading the .classpath dataprotected java.util.List<EclipseClasspathEntry> readClasspathEntries(java.io.File classpathFile) throws java.io.IOException
classpathFile
- The file to read classpath entries fromjava.io.IOException
- In any case of problem with reading the .classpath dataprotected java.util.List<EclipseClasspathEntry> extractClasspathEntries(java.io.File projectDir, org.pfsw.six.Element classpathElement)
protected java.lang.String calculatePath(java.io.File projectDir, java.lang.String pathName)
protected java.lang.String readDirFromLocationFile(java.io.File locationFile)
protected java.lang.String readProjectPathFrom(java.io.InputStream stream)
protected boolean readExpectedSequence(java.io.InputStream stream, int[] sequence)
protected java.lang.String readZeroTerminatedString(java.io.InputStream stream)
protected byte[] readToZero(java.io.InputStream stream) throws java.io.IOException
java.io.IOException