1 17 package org.apache.geronimo.deployment.util; 18 19 import java.io.IOException ; 20 import java.security.cert.Certificate ; 21 import java.util.jar.Attributes ; 22 import java.util.jar.JarEntry ; 23 import java.util.jar.Manifest ; 24 25 28 public class NestedJarEntry extends JarEntry { 29 private final JarEntry baseEntry; 30 private final Manifest manifest; 31 32 public NestedJarEntry(String name, JarEntry baseEntry, Manifest manifest) { 33 super(name); 34 this.baseEntry = baseEntry; 35 this.manifest = manifest; 36 } 37 38 public JarEntry getBaseEntry() { 39 return baseEntry; 40 } 41 42 public Attributes getAttributes() throws IOException { 43 if (manifest == null) { 44 return null; 45 } 46 return manifest.getAttributes(getName()); 47 } 48 49 55 public Certificate [] getCertificates() { 56 return null; 57 } 58 59 public long getTime() { 60 return baseEntry.getTime(); 61 } 62 63 public void setTime(long time) { 64 baseEntry.setTime(time); 65 } 66 67 public long getSize() { 68 return baseEntry.getSize(); 69 } 70 71 public void setSize(long size) { 72 baseEntry.setSize(size); 73 } 74 75 public long getCompressedSize() { 76 return baseEntry.getCompressedSize(); 77 } 78 79 public void setCompressedSize(long csize) { 80 baseEntry.setCompressedSize(csize); 81 } 82 83 public long getCrc() { 84 return baseEntry.getCrc(); 85 } 86 87 public void setCrc(long crc) { 88 baseEntry.setCrc(crc); 89 } 90 91 public int getMethod() { 92 return baseEntry.getMethod(); 93 } 94 95 public void setMethod(int method) { 96 baseEntry.setMethod(method); 97 } 98 99 public byte[] getExtra() { 100 return baseEntry.getExtra(); 101 } 102 103 public void setExtra(byte[] extra) { 104 baseEntry.setExtra(extra); 105 } 106 107 public String getComment() { 108 return baseEntry.getComment(); 109 } 110 111 public void setComment(String comment) { 112 baseEntry.setComment(comment); 113 } 114 115 public boolean isDirectory() { 116 return baseEntry.isDirectory(); 117 } 118 119 public String toString() { 120 return baseEntry.toString(); 121 } 122 123 public int hashCode() { 124 return baseEntry.hashCode(); 125 } 126 127 public Object clone() { 128 return new NestedJarEntry(getName(), baseEntry, manifest); 129 } 130 } 131 | Popular Tags |