Package javassist
Class ClassPoolTail
java.lang.Object
javassist.ClassPoolTail
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendClassPath
(String pathname) static void
copyStream
(InputStream fin, OutputStream fout) Reads from an input stream and write to an output stream until it reaches the end.Searches the class path to obtain the URL of the class file specified by classname.insertClassPath
(String pathname) private static ClassPath
makePathObject
(String pathname) (package private) InputStream
openClassfile
(String classname) Opens the class file for the class specified byclassname
.static byte[]
readStream
(InputStream fin) Reads from an input stream until it reaches the end.void
toString()
(package private) void
writeClassfile
(String classname, OutputStream out) This method does not close the output stream.
-
Field Details
-
pathList
-
-
Constructor Details
-
ClassPoolTail
public ClassPoolTail()
-
-
Method Details
-
toString
-
insertClassPath
-
appendClassPath
-
removeClassPath
-
appendSystemPath
-
insertClassPath
- Throws:
NotFoundException
-
appendClassPath
- Throws:
NotFoundException
-
makePathObject
- Throws:
NotFoundException
-
writeClassfile
void writeClassfile(String classname, OutputStream out) throws NotFoundException, IOException, CannotCompileException This method does not close the output stream. -
openClassfile
Opens 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
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
Reads from an input stream until it reaches the end.- Returns:
- the contents of that input stream
- Throws:
IOException
-
copyStream
Reads from an input stream and write to an output stream until it reaches the end. This method does not close the streams.- Throws:
IOException
-