All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zving.preloader.zip.JarMarker Maven / Gradle / Ivy

There is a newer version: 0.3.0
Show newest version
package com.zving.preloader.zip;

import java.util.zip.ZipException;

public final class JarMarker
  implements ZipExtraField
{
  private static final ZipShort ID = new ZipShort(51966);
  private static final ZipShort NULL = new ZipShort(0);
  private static final byte[] NO_BYTES = new byte[0];
  private static final JarMarker DEFAULT = new JarMarker();
  
  public static JarMarker getInstance()
  {
    return DEFAULT;
  }
  
  public ZipShort getHeaderId()
  {
    return ID;
  }
  
  public ZipShort getLocalFileDataLength()
  {
    return NULL;
  }
  
  public ZipShort getCentralDirectoryLength()
  {
    return NULL;
  }
  
  public byte[] getLocalFileDataData()
  {
    return NO_BYTES;
  }
  
  public byte[] getCentralDirectoryData()
  {
    return NO_BYTES;
  }
  
  public void parseFromLocalFileData(byte[] data, int offset, int length)
    throws ZipException
  {
    if (length != 0) {
      throw new ZipException("JarMarker doesn't expect any data");
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy