You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-dev@jakarta.apache.org by Carl Cronje <ca...@hemtech.co.za> on 2003/06/25 16:05:04 UTC
Slow Class file dump
Hi
I have noticed that dumping a JavaClass to disk is very slow
Could someone with update permission please fix:
JavaClass.java
in method -- public void dump(File file) (line number 268)
to use a BufferedOutputStream i.e.:
dump(new DataOutputStream(new BufferedOutputStream(new
FileOutputStream(file))));
the perf is about 95% faster.
Thanks
Carl
/**
* Dump class to a file.
*
* @param file Output file
* @throws IOException
*/
public void dump(File file) throws IOException
{
String parent = file.getParent();
if(parent != null) {
File dir = new File(parent);
if(dir != null)
dir.mkdirs();
}
dump(new DataOutputStream(new FileOutputStream(file)));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org