In Jalview2XML I see this:
int entryCount = 1;
do
{
jin = jprovider.getJarInputStream();
for (int i = 0; i < entryCount; i++)
{
jarentry = jin.getNextJarEntry();
}
if (jarentry != null && jarentry.getName().endsWith(".xml"))
{
... entryCount++;
}
else if (jarentry != null)
{
// Some other file here.
entryCount++;
}
} while (jarentry != null);
What's the reason behind doing that instead of:
int entryCount = 1;
jin = jprovider.getJarInputStream();
do
{
jarentry = jin.getNextJarEntry();
if (jarentry != null && jarentry.getName().endsWith(".xml"))
{
... entryCount++;
}
} while (jarentry != null);
Isn't the first unnecessarily opening and reading completely the jar file
as many time as there are jar entries? Why not just read it straight
through? So, for example, each URL would be opened and read three times
for a standard file.
Also, can you tell me why a Jalview session file has two models, both of
which are read, but only one of which is displayed? One has a full path to
it. The other does not. One is the original? and the other is the save? Is
that it? But why read both?
Bob
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
_______________________________________________
Jalview-dev mailing list
[email protected]
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev