本文整理了Java中java.util.jar.Manifest.clear()
方法的一些代码示例,展示了Manifest.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Manifest.clear()
方法的具体详情如下:
包路径:java.util.jar.Manifest
类名称:Manifest
方法名:clear
[英]Resets the both the main attributes as well as the entry attributes associated with this Manifest.
[中]
代码示例来源:origin: hcoles/pitest
private void createJarFromClassPathResources(final FileOutputStream fos,
final String location) throws IOException {
final Manifest m = new Manifest();
m.clear();
final Attributes global = m.getMainAttributes();
if (global.getValue(Attributes.Name.MANIFEST_VERSION) == null) {
global.put(Attributes.Name.MANIFEST_VERSION, "1.0");
}
final File mylocation = new File(location);
global.putValue(BOOT_CLASSPATH, getBootClassPath(mylocation));
global.putValue(PREMAIN_CLASS, AGENT_CLASS_NAME);
global.putValue(CAN_REDEFINE_CLASSES, "true");
global.putValue(CAN_SET_NATIVE_METHOD, "true");
try (JarOutputStream jos = new JarOutputStream(fos, m)) {
addClass(HotSwapAgent.class, jos);
addClass(CodeCoverageStore.class, jos);
addClass(InvokeReceiver.class, jos);
}
}
代码示例来源:origin: org.microemu/microemu-javase
public void clear() {
super.clear();
midletEntries = null;
correctedJarURL = null;
}
代码示例来源:origin: org.knopflerfish/framework
/**
* Delegate to original manifest.
*/
@Override
public void clear() {
mf.clear();
mainAttrs = null;
}
代码示例来源:origin: com.android.tools.build/builder
mManifest.clear();
byte[] manifestBytes = manifestEntry.read();
mManifest.read(new ByteArrayInputStream(manifestBytes));
内容来源于网络,如有侵权,请联系作者删除!