Package java.util.jar

Examples of java.util.jar.Attributes.keySet()


                        //System.out.println(key);                     
                        if (key.equals("com.sun.xml.bind.v2.runtime")) {
                          log.info("Found JAXB reference implementation in " + url);
                          mainAttribs = manifest.getAttributes((String)key);
                       
                          for(Object key2  : mainAttribs.keySet() ) {
                            log.info(key2 + " : " + mainAttribs.getValue((java.util.jar.Attributes.Name)key2));
                          }
                        }
                      }
                     
View Full Code Here


     * Return a mutable dictionary of manifest headers
     */
    public Dictionary<String, String> getHeaders() {
        Hashtable<String, String> headers = new Hashtable<String, String>();
        Attributes mainAttributes = manifest.getMainAttributes();
        for (Object key : mainAttributes.keySet()) {
            Name name = (Name) key;
            String value = mainAttributes.getValue(name);
            headers.put(name.toString(), value);
        }
        return headers;
View Full Code Here

    // Remove all the headers mentioned in -removeheaders
    Map removes = parseHeader(getProperty(REMOVE_HEADERS));
    for (Iterator i = removes.keySet().iterator(); i.hasNext();) {
      String header = (String) i.next();
      for (Iterator j = main.keySet().iterator(); j.hasNext();) {
        Attributes.Name attr = (Attributes.Name) j.next();
        if (attr.toString().matches(header)) {
          j.remove();
          progress("Removing header: " + header);
        }
View Full Code Here

   * @throws IOException
   */
  public void mergeManifest(Manifest manifest) throws IOException {
    if (manifest != null) {
      Attributes attributes = manifest.getMainAttributes();
      for (Iterator i = attributes.keySet().iterator(); i.hasNext();) {
        Name name = (Name) i.next();
        String key = name.toString();
        // Dont want instructions
        if (key.startsWith("-"))
          continue;
View Full Code Here

    // Remove all the headers mentioned in -removeheaders
    Map<String, Map<String, String>> removes = parseHeader(getProperty(REMOVEHEADERS));
    Set<Instruction> matchers = Instruction.replaceWithInstruction(removes).keySet();

    Collection<Object> toBeRemoved = Instruction.select(matchers, main.keySet());
    Iterator<Object> i = main.keySet().iterator();
    while (i.hasNext())
      if (toBeRemoved.contains(i.next()))
        i.remove();
View Full Code Here

    // Remove all the headers mentioned in -removeheaders
    Map<String, Map<String, String>> removes = parseHeader(getProperty(REMOVEHEADERS));
    Set<Instruction> matchers = Instruction.replaceWithInstruction(removes).keySet();

    Collection<Object> toBeRemoved = Instruction.select(matchers, main.keySet());
    Iterator<Object> i = main.keySet().iterator();
    while (i.hasNext())
      if (toBeRemoved.contains(i.next()))
        i.remove();

    dot.setManifest(manifest);
View Full Code Here

   * @throws IOException
   */
  public void mergeManifest(Manifest manifest) throws IOException {
    if (manifest != null) {
      Attributes attributes = manifest.getMainAttributes();
      for (Iterator<Object> i = attributes.keySet().iterator(); i.hasNext();) {
        Name name = (Name) i.next();
        String key = name.toString();
        // Dont want instructions
        if (key.startsWith("-"))
          continue;
View Full Code Here

        // Remove all the headers mentioned in -removeheaders
        Map<String, Map<String, String>> removes = parseHeader(getProperty(REMOVE_HEADERS));
        for (Iterator<String> i = removes.keySet().iterator(); i.hasNext();) {
            String header = i.next();
            for (Iterator<Object> j = main.keySet().iterator(); j.hasNext();) {
                Attributes.Name attr = (Attributes.Name) j.next();
                if (attr.toString().matches(header)) {
                    j.remove();
                    progress("Removing header: " + header);
                }
View Full Code Here

     * @throws IOException
     */
    public void mergeManifest(Manifest manifest) throws IOException {
        if (manifest != null) {
            Attributes attributes = manifest.getMainAttributes();
            for (Iterator<Object> i = attributes.keySet().iterator(); i
                    .hasNext();) {
                Name name = (Name) i.next();
                String key = name.toString();
                // Dont want instructions
                if (key.startsWith("-"))
View Full Code Here

    }

    private Dictionary<String, String> getManifestHeaders(Manifest manifest) {
        Hashtable<String, String> headers = new Hashtable<String, String>();
        Attributes mainatts = manifest.getMainAttributes();
        for (Object key : mainatts.keySet()) {
            String name = key.toString();
            String value = mainatts.getValue(name);
            headers.put(name, value);
        }
        return headers;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.