OSDN Git Service

Remove as sg.exe is not a open source product.
[nxt-jsp/etrobo-atk.git] / lejos_osek / lejos_nxj / src / java / jtools / js / tinyvm / ClassPath.java
1 package js.tinyvm;
2
3 import java.io.IOException;
4 import java.io.InputStream;
5
6 /**
7  * Class path.
8  */
9 public class ClassPath implements IClassPath
10 {
11    /**
12     * BCEL class path.
13     */
14    private org.apache.bcel.util.ClassPath _classPath;
15
16    /**
17     * Constructor.
18     * 
19     * @param classPath string class path separated with File.pathSeparatorChar
20     */
21    public ClassPath (String classPath)
22    {
23       _classPath = new org.apache.bcel.util.ClassPath(classPath);
24    }
25
26    /*
27     * (non-Javadoc)
28     * 
29     * @see js.tinyvm.IClassPath#getInputStream(java.lang.String)
30     */
31    public InputStream getInputStream (String className) throws IOException
32    {
33       return _classPath.getClassFile(className).getInputStream();
34    }
35    
36    public String toString() {
37            return _classPath.toString();
38    }
39 }