Get size of jar file loaded by urlclassloader
Posted
by Aliya
on Stack Overflow
See other posts from Stack Overflow
or by Aliya
Published on 2009-04-28T18:39:29Z
Indexed on
2010/05/22
9:10 UTC
Read the original article
Hit count: 114
Does anybody know a good way to find the file size that is dynamically loaded by urlclassloader?
I am using the urlclassloader in the following manner, but need to keep track of how much bandwidth is being used.
URLClassLoader sysloader = (URLClassLoader) ClassLoader
.getSystemClassLoader();
Class<URLClassLoader> sysclass = URLClassLoader.class;
Method method = sysclass.getDeclaredMethod("addURL", parameters);
method.setAccessible(true);
method.invoke(sysloader, (Object[]) urls);
Thanks in advance!
© Stack Overflow or respective owner