1 package com.atlassian.plugin;
2
3 import java.io.*;
4
5
6
7
8
9
10 public class XmlPluginArtifact implements PluginArtifact
11 {
12 private final File xmlFile;
13
14 public XmlPluginArtifact(File xmlFile)
15 {
16 this.xmlFile = xmlFile;
17 }
18
19
20
21
22 public InputStream getResourceAsStream(String name) throws PluginParseException
23 {
24 return null;
25 }
26
27 public String getName()
28 {
29 return xmlFile.getName();
30 }
31
32
33
34
35
36 public InputStream getInputStream()
37 {
38 try
39 {
40 return new BufferedInputStream(new FileInputStream(xmlFile));
41 }
42 catch (FileNotFoundException e)
43 {
44 throw new RuntimeException("Could not find XML file for eading: " + xmlFile, e);
45 }
46 }
47 }