KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > jar > LocalPackageSource


1 /*
2  * Copyright area
3  */

4
5 package org.objectweb.fractal.jar;
6
7 import java.io.File JavaDoc;
8 import java.io.FileInputStream JavaDoc;
9 import java.io.IOException JavaDoc;
10 import java.io.InputStream JavaDoc;
11
12 public class LocalPackageSource implements PackageSource {
13
14   private String JavaDoc src;
15   
16   public LocalPackageSource (String JavaDoc src) {
17     this.src = src;
18   }
19   
20   public InputStream JavaDoc getPackage (String JavaDoc pkg) throws IOException JavaDoc {
21     return new FileInputStream JavaDoc(new File JavaDoc(src, pkg + ".far"));
22   }
23 }
24
Popular Tags