Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[geclipse-dev] Open InputStream

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());


java.io.IOException: Stream closed
	at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:134)
	at java.io.BufferedInputStream.available(BufferedInputStream.java:381)
	at jobsubmission.Application.start(Application.java:231)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1148)





and that 
    URI uri = new URI("gsiftp://aliserv6.ct.infn.it:2811/dpm/ct.infn.it/home/geclipsetutor/foofo/";);	        
	        IFileStore fs = EFS.getStore( uri ); 
    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?

thx pod

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger


Back to the top