[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [geclipse-dev] Open InputStream
|
Hi all
I thought URI("gsiftp://aliserv6.ct.infn.it:2811/dpm/ct.infn.it/home/geclipsetutor/getutor.t01"); should be enough to point at the file to fetch.
But it still doesnt work - The file is found but the content isnt printed out?
IFileStore fs = EFS.getStore( uri );
for (IFileStore store : fs.childStores(EFS.NONE,null)) {
if ( store.getName().equals("getutor.t01") ) {
file1 = store;
System.out.println(file1.getName() );
break;
}
}
BufferedInputStream stream = new BufferedInputStream(file1.openInputStream(EFS.NONE, null));
while(stream.available() != 0)
System.out.print((char)stream.read());
I get no exceptions in the eclipse console - In the eclipse log is
!ENTRY org.eclipse.update.configurator 2008-05-29 18:43:50.723
!MESSAGE Unable to find feature.xml in directory: /home/pod/eclipsetest/eclipse/features/eu.geclipse.aws_1.0.0.N20080529-0500.jar
!ENTRY org.eclipse.update.configurator 2008-05-29 18:43:50.724
!MESSAGE Unable to find feature.xml in directory: /home/pod/eclipsetest/eclipse/features/eu.geclipse_1.0.0.N20080529-0500.jar
!ENTRY org.eclipse.update.configurator 2008-05-29 18:43:50.765
!MESSAGE Unable to find feature.xml in directory: /home/pod/features/eu.geclipse_1.0.0.N20080516-0600.jar
!ENTRY org.eclipse.update.configurator 2008-05-29 18:43:50.765
!MESSAGE Unable to find feature.xml in directory: /home/pod/features/eu.geclipse.aws_1.0.0.N20080516-0600.jar
I use the latest NIghtlyBuilds
thx pod
-------- Original-Nachricht --------
> Datum: Thu, 29 May 2008 18:07:41 +0200
> Von: Mateusz Pabis\' <uranium@xxxxxxxxxxxxx>
> An: Developer mailing list <geclipse-dev@xxxxxxxxxxx>
> Betreff: Re: [geclipse-dev] Open InputStream
> POD69@xxxxxxx pisze:
> > Hi all
> >
> > I dont know whats wrong with that code?
> > That should open a Stream on the getutor.t01 file and print out its
> content? Whats wrong with that? Am I wrong.
> >
> > URI uri = new
> URI("gsiftp://aliserv6.ct.infn.it:2811/dpm/ct.infn.it/home/geclipsetutor/getutor.t01");
> > IFileStore fs = EFS.getStore( uri );
> > BufferedInputStream stream = new
> BufferedInputStream(fs.openInputStream(EFS.NONE, null));
> > while(stream.available() != 0)
> > System.out.print((char)stream.read());
> >
>
> As I replied to Romain (in one post nearby):
>
> Also I didn't figure out how to perform fetchInfo for a single file,
> without listing whole directory. Hence, if you would like to download a
> single file, you should perform this cumbersome usecase (in pseudocode):
> fs = getFileStore (new
> URI("gsiftp://server:2811/path/to/the/parent/directory/") )
> find in fs.childStores your desired file, call it fsfile
>
> fsfile.get(Input|Output)Stream();
>
> So, in your case it would look like this:
> URI uri = new
> URI("gsiftp://aliserv6.ct.infn.it:2811/dpm/ct.infn.it/home/geclipsetutor/");
>
> IFileStore file;
>
> IFileStore fs = EFS.getStore( uri );
> for (IFileStore store : fs.childStores() ) {
> if ( store.getName().equals("getutor.t01") ) {
> file = store;
> break;
> }
> }
>
>
> BufferedInputStream stream = new
> BufferedInputStream(file.openInputStream(EFS.NONE, null));
> while(stream.available() != 0)
> System.out.print((char)stream.read());
> >
> >
> > and that
> > URI uri = new
> URI("gsiftp://aliserv6.ct.infn.it:2811/dpm/ct.infn.it/home/geclipsetutor/foofo/");
> > IFileStore fs = EFS.getStore( uri );
> Please try to invoke #childStores() or childNames() here
> > IFileStore homeDir =
> fileSystem.getStore(URI.create("/home/pod/files/"));
> > fs.copy(homeDir, EFS.OVERWRITE, null);
> >
> > should copy all files and dirs recursively - but doesnt work ?
> >
> > the only thing that works is fs.mkdir() I can create a dir.
> >
> > So what to do?
>
> hope this helps.
> I'll be here for next 1hr in case you need more help :-)
>
> --
> Mateusz Pabis
> _______________________________________________
> geclipse-dev mailing list
> geclipse-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/geclipse-dev
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger