Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 18 19 package org.apache.tools.zip; 20 21 import java.util.zip.ZipException ; 22 23 29 public final class JarMarker implements ZipExtraField { 30 31 private static final ZipShort ID = new ZipShort(0xCAFE); 32 private static final ZipShort NULL = new ZipShort(0); 33 private static final byte[] NO_BYTES = new byte[0]; 34 private static final JarMarker DEFAULT = new JarMarker(); 35 36 37 public JarMarker() { 38 } 40 41 45 public static JarMarker getInstance() { 46 return DEFAULT; 47 } 48 49 53 public ZipShort getHeaderId() { 54 return ID; 55 } 56 57 62 public ZipShort getLocalFileDataLength() { 63 return NULL; 64 } 65 66 71 public ZipShort getCentralDirectoryLength() { 72 return NULL; 73 } 74 75 81 public byte[] getLocalFileDataData() { 82 return NO_BYTES; 83 } 84 85 90 public byte[] getCentralDirectoryData() { 91 return NO_BYTES; 92 } 93 94 102 public void parseFromLocalFileData(byte[] data, int offset, int length) 103 throws ZipException { 104 if (length != 0) { 105 throw new ZipException ("JarMarker doesn't expect any data"); 106 } 107 } 108 } 109
| Popular Tags
|