public static void writeIndividualSection(OutputStream out, String name, Attributes attributes) throws IOException { writeAttribute(out, "Name", name); if (!attributes.isEmpty()) { writeAttributes(out, getAttributesSortedByName(attributes)); } writeSectionDelimiter(out); }
if (manifest.getMainAttributes().isEmpty()) {
private void filterManifestEntry(final Collection<Attributes> entry) { for (final Iterator<Attributes> i = entry.iterator(); i.hasNext();) { final Attributes attributes = i.next(); filterManifestEntryAttributes(attributes); if (attributes.isEmpty()) { i.remove(); } } }
private Map<String, String> getEntries(Attributes attrs) { Map<String, String> entries = new HashMap<String, String>(); if ((attrs != null) && (!attrs.isEmpty())) { Set<Object> keys = attrs.keySet(); for (Object key : keys) { entries.put(key.toString(), attrs.getValue((Attributes.Name)key)); } } return entries; }
private Map<String, String> getEntries(Attributes attrs) { Map<String, String> entries = new HashMap<String, String>(); if ((attrs != null) && (!attrs.isEmpty())) { Set<Object> keys = attrs.keySet(); for (Object key : keys) { entries.put(key.toString(), attrs.getValue((Attributes.Name)key)); } } return entries; }
private Collection<String> getCustomHeaders(Attributes attrs) { Collection<String> customKeys = new HashSet<String>(); Collection<Attributes.Name> standardKeys = getDeploymentStandardHeaders(); if ((attrs != null) && (!!!attrs.isEmpty())) { Set<Object> keys = attrs.keySet(); if ((keys != null) && (!!!keys.isEmpty())) { for (Object eachKey : keys) { String key = eachKey.toString(); customKeys.add(key); } customKeys.removeAll(standardKeys); } } return customKeys; }
private Collection<String> getCustomHeaders(Attributes attrs) { Collection<String> customKeys = new HashSet<String>(); Collection<Attributes.Name> standardKeys = getDeploymentStandardHeaders(); if ((attrs != null) && (!!!attrs.isEmpty())) { Set<Object> keys = attrs.keySet(); if ((keys != null) && (!!!keys.isEmpty())) { for (Object eachKey : keys) { String key = eachKey.toString(); customKeys.add(key); } customKeys.removeAll(standardKeys); } } return customKeys; }
protected void putNextEntry(String contentType, String entryName, Date lastModified, Map<String, String> attributes) throws IOException { if (contentType.trim().length() == 0) { throw new IllegalArgumentException("contentType must not be null or empty."); } entryName = entryName.replaceAll("\\\\", "/"); entryName = entryName.charAt(0) == '/' ? entryName.substring(1) : entryName; JarEntry gedxEntry = new JarEntry(entryName); // will throw a runtime exception if entryName is not okay Attributes entryAttrs = new Attributes(); if (lastModified != null) { entryAttrs.putValue("X-DC-modified", GedcomxTimeStampUtil.formatAsXmlUTC(lastModified)); } entryAttrs.put(Attributes.Name.CONTENT_TYPE, contentType); if (attributes != null) { for (Map.Entry<String, String> entry : attributes.entrySet()) { entryAttrs.putValue(entry.getKey(), entry.getValue()); } } if (!entryAttrs.isEmpty()) { this.mf.getEntries().put(entryName, entryAttrs); } this.gedxOutputStream.putNextEntry(gedxEntry); }
Attributes mainAttributes = manifest.getMainAttributes(); Attributes filteredMainAttributes = filterAttributes( instructions, mainAttributes, null ); if ( !filteredMainAttributes.isEmpty() ) Attributes attributes = entry.getValue(); Attributes filteredAttributes = filterAttributes( instructions, attributes, null ); if ( !filteredAttributes.isEmpty() )
public static void writeIndividualSection(OutputStream out, String name, Attributes attributes) throws IOException { writeAttribute(out, "Name", name); if (!attributes.isEmpty()) { writeAttributes(out, getAttributesSortedByName(attributes)); } writeSectionDelimiter(out); }
if (!modeAttributes.isEmpty()) manifestBuild.getEntries().put(mode.name, modeAttributes);
if (manifest.getMainAttributes().isEmpty())
if (manifest.getMainAttributes().isEmpty())