protected Object readAttribute(String name, String attrName) { if ("java.io.File".equals(attrName)) { return null; } Attributes attr1 = getManifest().getAttributes(name); try { return (attr1 == null) ? null : attr1.getValue(attrName); } catch (IllegalArgumentException iax) { return null; } }
protected Enumeration<String> attributes(String name) { Attributes attr1 = getManifest().getAttributes(name); if (attr1 != null) { class ToString implements org.openide.util.Enumerations.Processor<Object, String> { public String process(Object obj, Collection<Object> ignore) { return obj.toString(); } } return org.openide.util.Enumerations.convert(Collections.enumeration(attr1.keySet()), new ToString()); } else { return org.openide.util.Enumerations.empty(); } }
public static String getImplementationVersion(JarFileSystem jarFile) { Manifest manifest = jarFile.getManifest(); Attributes attributes = manifest.getMainAttributes(); return attributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION); }
protected Object readAttribute(String name, String attrName) { Attributes attr = getManifest ().getAttributes (name); try { return attr == null ? null : attr.getValue (attrName); } catch (IllegalArgumentException iax) { return null; } }
protected Object readAttribute(String name, String attrName) { Attributes attr = getManifest ().getAttributes (name); try { return attr == null ? null : attr.getValue (attrName); } catch (IllegalArgumentException iax) { return null; } }
private static Version getVersion(File systemJarFile) { if (!systemJarFile.exists()) { return null; } try { JarFileSystem systemJar = new JarFileSystem(); systemJar.setJarFile(systemJarFile); Attributes attributes = systemJar.getManifest().getMainAttributes(); String version = attributes.getValue("Specification-Version"); // NOI18N if (version != null) { return new Version(version); } return null; } catch (IOException ex) { LOGGER.log(Level.INFO, null, ex); return null; } catch (PropertyVetoException ex) { LOGGER.log(Level.INFO, null, ex); return null; } }
protected Enumeration attributes(String name) { Attributes attr = getManifest ().getAttributes (name); if (attr != null) { class ToString implements org.openide.util.Enumerations.Processor { public Object process (Object obj, Collection ignore) { return obj.toString (); } } return org.openide.util.Enumerations.convert ( Collections.enumeration (attr.keySet ()), new ToString () ); } else { return org.openide.util.Enumerations.empty(); } }
protected Enumeration attributes(String name) { Attributes attr = getManifest ().getAttributes (name); if (attr != null) { class ToString implements org.openide.util.Enumerations.Processor { public Object process (Object obj, Collection ignore) { return obj.toString (); } } return org.openide.util.Enumerations.convert ( Collections.enumeration (attr.keySet ()), new ToString () ); } else { return org.openide.util.Enumerations.empty(); } }