Package javassist
Class ClassPoolTail
- java.lang.Object
-
- javassist.ClassPoolTail
-
final class ClassPoolTail extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassPathListpathList
-
Constructor Summary
Constructors Constructor Description ClassPoolTail()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassPathappendClassPath(java.lang.String pathname)ClassPathappendClassPath(ClassPath cp)ClassPathappendSystemPath()static voidcopyStream(java.io.InputStream fin, java.io.OutputStream fout)Reads from an input stream and write to an output stream until it reaches the end.java.net.URLfind(java.lang.String classname)Searches the class path to obtain the URL of the class file specified by classname.ClassPathinsertClassPath(java.lang.String pathname)ClassPathinsertClassPath(ClassPath cp)private static ClassPathmakePathObject(java.lang.String pathname)(package private) java.io.InputStreamopenClassfile(java.lang.String classname)Opens the class file for the class specified byclassname.static byte[]readStream(java.io.InputStream fin)Reads from an input stream until it reaches the end.voidremoveClassPath(ClassPath cp)java.lang.StringtoString()(package private) voidwriteClassfile(java.lang.String classname, java.io.OutputStream out)This method does not close the output stream.
-
-
-
Field Detail
-
pathList
protected ClassPathList pathList
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
removeClassPath
public void removeClassPath(ClassPath cp)
-
appendSystemPath
public ClassPath appendSystemPath()
-
insertClassPath
public ClassPath insertClassPath(java.lang.String pathname) throws NotFoundException
- Throws:
NotFoundException
-
appendClassPath
public ClassPath appendClassPath(java.lang.String pathname) throws NotFoundException
- Throws:
NotFoundException
-
makePathObject
private static ClassPath makePathObject(java.lang.String pathname) throws NotFoundException
- Throws:
NotFoundException
-
writeClassfile
void writeClassfile(java.lang.String classname, java.io.OutputStream out) throws NotFoundException, java.io.IOException, CannotCompileExceptionThis method does not close the output stream.- Throws:
NotFoundExceptionjava.io.IOExceptionCannotCompileException
-
openClassfile
java.io.InputStream openClassfile(java.lang.String classname) throws NotFoundExceptionOpens the class file for the class specified byclassname.- Parameters:
classname- a fully-qualified class name- Returns:
- null if the file has not been found.
- Throws:
NotFoundException- if any error is reported by ClassPath.
-
find
public java.net.URL find(java.lang.String classname)
Searches the class path to obtain the URL of the class file specified by classname. It is also used to determine whether the class file exists.- Parameters:
classname- a fully-qualified class name.- Returns:
- null if the class file could not be found.
-
readStream
public static byte[] readStream(java.io.InputStream fin) throws java.io.IOExceptionReads from an input stream until it reaches the end.- Returns:
- the contents of that input stream
- Throws:
java.io.IOException
-
copyStream
public static void copyStream(java.io.InputStream fin, java.io.OutputStream fout) throws java.io.IOExceptionReads from an input stream and write to an output stream until it reaches the end. This method does not close the streams.- Throws:
java.io.IOException
-
-