--- SyspathJavaLoader-2884.java 2006-10-12 12:35:13.258745600 -0400 +++ SyspathJavaLoader-new.java 2006-10-12 12:38:04.415506400 -0400 @@ -107,6 +107,8 @@ PyList path = Py.getSystemState().path; for (int i = 0; i < path.__len__(); i++) { InputStream fis = null; + File file = null; + int size = 0; PyObject entry = path.__getitem__(i); if (entry instanceof SyspathArchive) { SyspathArchive archive = (SyspathArchive) entry; @@ -115,19 +117,33 @@ if (ze != null) { try { fis = archive.getInputStream(ze); + size = (int)ze.getSize(); } catch (IOException exc) { ; } } } else { String dir = entry.__str__().toString(); - fis = open(dir, name); + file = getFile(dir, name); + if( file != null ) { + size = (int)file.length(); + try { + fis = new FileInputStream( file ); + } catch (FileNotFoundException e) { + ; + } + } } if (fis == null) { continue; } try { - byte[] buffer = FileUtil.readBytes(fis); + byte[] buffer = new byte[size]; + int nread=0; + while (nread