View Javadoc

1   /*
2    * Copyright 2001-2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.apache.geronimo.ews.ws4j2ee.utils.packager;
18  
19  import java.io.InputStream;
20  import java.util.jar.JarEntry;
21  
22  /***
23   * <p>reprsent the information about a entry added to the JAR file.
24   * the Entry reprsent a Jar entry and the the source represent the file
25   * going to be added to the jar file.</p>
26   *
27   * @author Srinath perera(hemapani@opensource.lk)
28   */
29  public JARFileEntry {/package-summary.html">class JARFileEntry {
30      private JarEntry jarEntry;
31      private InputStream source;
32  
33      publicJARFileEntry(String jarfilePath, InputStream source) {/package-summary.html">ong> JARFileEntry(String jarfilePath, InputStream source) {
34          this.jarEntry = new JarEntry(jarfilePath);
35          this.source = source;
36          if (this.source == null || this.jarEntry == null)
37              throw new RuntimeException("source or jar entry can't be null");
38      }
39  
40      /***
41       * @return
42       */
43      public JarEntry getJarEntry() {
44          return jarEntry;
45      }
46  
47      /***
48       * @return
49       */
50      public InputStream getSource() {
51          return source;
52      }
53  
54  }