1 12 package org.eclipse.help.internal.index; 13 14 import java.io.FileInputStream ; 15 import java.io.IOException ; 16 import java.io.InputStream ; 17 18 import org.eclipse.help.internal.util.ResourceLocator; 19 20 public class IndexFile { 21 22 private String pluginId; 23 private String file; 24 private String locale; 25 26 public IndexFile(String pluginId, String file, String locale) { 27 this.pluginId = pluginId; 28 this.file = file; 29 this.locale = locale; 30 } 31 32 public String getFile() { 33 return file; 34 } 35 36 public String getLocale() { 37 return locale; 38 } 39 40 public String getPluginId() { 41 return pluginId; 42 } 43 44 public InputStream getInputStream() throws IOException { 45 if (pluginId != null) 46 return ResourceLocator.openFromPlugin(pluginId, file, locale); 47 else 48 return new FileInputStream (file); 49 } 50 } 51 | Popular Tags |