~ubuntu-branches/ubuntu/oneiric/tuxguitar/oneiric

« back to all changes in this revision

Viewing changes to TuxGuitar-browser-ftp/src/org/herac/tuxguitar/gui/tools/browser/ftp/TGBrowserElementImpl.java

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Coval
  • Date: 2008-06-19 00:30:30 UTC
  • mto: (5.1.2 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20080619003030-h719szrhsngou7c6
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.herac.tuxguitar.gui.tools.browser.ftp;
 
2
 
 
3
import java.io.InputStream;
 
4
 
 
5
import org.herac.tuxguitar.gui.tools.browser.TGBrowserException;
 
6
import org.herac.tuxguitar.gui.tools.browser.base.TGBrowserElement;
 
7
 
 
8
public class TGBrowserElementImpl extends TGBrowserElement{
 
9
        
 
10
        private TGBrowserImpl browser;
 
11
        private String path;
 
12
        private String info;
 
13
        
 
14
        public TGBrowserElementImpl(TGBrowserImpl browser,String name,String info,String path) {
 
15
                super(name);
 
16
                this.browser = browser;
 
17
                this.info = info;
 
18
                this.path = path;
 
19
        }
 
20
        
 
21
        public boolean isFolder(){
 
22
                return (this.info != null && this.info.length() > 0 && this.info.charAt(0) == 'd');
 
23
        }
 
24
        
 
25
        public InputStream getInputStream()throws TGBrowserException {
 
26
                return this.browser.getInputStream(this.path,this);
 
27
        }
 
28
        
 
29
}