[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/25752] ftpurlconnection well broke
From: |
si at naims dot co dot uk |
Subject: |
[Bug classpath/25752] ftpurlconnection well broke |
Date: |
15 Feb 2006 22:49:37 -0000 |
------- Comment #6 from si at naims dot co dot uk 2006-02-15 22:49 -------
i think in the getinputstream method using the "namelist" command instead of
"cwd" has a lot going for it, faster and standarised and by using the code
below ( untested and incomplete ) i think you get directory output that is
transparent with the "file" protocol, which makes this class much more useful.
ArrayList files = connection.nameList(url.getPath());
// fork to file code on error because not directory
// robust test, allows for varied file systems at the remote end.
ByteArrayOutputStream sink = new ByteArrayOutputStream();
Writer writer = new PrintWriter(sink);
Iterator fileIter = files.iterator();
while ( fileIter.hasNext() ) {
sink.println(fileIter.next());
};
return new ByteArrayInputStream(sink.toByteArray());
i hope this shows the idea, i can't run classpath at the moment, and wanted to
make this point now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25752
- [Bug classpath/25752] ftpurlconnection well broke, jeroen at frijters dot net, 2006/02/15
- [Bug classpath/25752] ftpurlconnection well broke, jeroen at frijters dot net, 2006/02/15
- [Bug classpath/25752] ftpurlconnection well broke,
si at naims dot co dot uk <=
- [Bug classpath/25752] ftpurlconnection well broke, jeroen at frijters dot net, 2006/02/16
- [Bug classpath/25752] ftpurlconnection well broke, si at naims dot co dot uk, 2006/02/16
- [Bug classpath/25752] ftpurlconnection well broke, jeroen at frijters dot net, 2006/02/17
- [Bug classpath/25752] ftpurlconnection well broke, jeroen at frijters dot net, 2006/02/17
- [Bug classpath/25752] ftpurlconnection well broke, cvs-commit at developer dot classpath dot org, 2006/02/17
- [Bug classpath/25752] ftpurlconnection well broke, pinskia at gcc dot gnu dot org, 2006/02/17