Cindy Ballreich wrote:
> By modifying the load(URL url)
> method slightly to send a BufferedReader I was able to load files a lot
> faster. (19 times faster on my system!) Here's what I did...
>
> public Scene load(URL url) throws FileNotFoundException,
> IncorrectFormatException,
> ParsingErrorException
> {
> InputStreamReader isr; // renamed
> BufferedReader reader; // new
>
> setBaseUrlFromUrl(url);
>
> try {
> isr = new InputStreamReader(new
> BufferedInputStream(url.openStream()));
> reader = new BufferedReader(isr); // new
etc..
There is no need to use two buffered streams here. Note that Cindy
buffers the InputStream _and_ then also creates a BufferedReader as
well. This is basically redundant, you only need one (doesn't really
matter which).
--
Justin Couch Author, Java Hacker
Snr Software Engineer [EMAIL PROTECTED]
ADI Ltd, Systems Group http://www.vlc.com.au/~justin/
Java3D FAQ: http://tintoy.ncsa.uiuc.edu/~srp/java3d/faq.html
-------------------------------------------------------------------
"Look through the lens, and the light breaks down into many lights.
Turn it or move it, and a new set of arrangements appears... is it
a single light or many lights, lights that one must know how to
distinguish, recognise and appreciate? Is it one light with many
frames or one frame for many lights?" -Subcomandante Marcos
-------------------------------------------------------------------
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/