StaticWeaveJAROutputHandlerpublic class StaticWeaveJAROutputHandler extends AbstractStaticWeaveOutputHandler The class provides a set of methods to pack passing in entries into the sepcified archive file.
the class JAR output. |
Constructors Summary |
---|
public StaticWeaveJAROutputHandler(JarOutputStream outputStreamHolder)Construct an instance of StaticWeaveJAROutputHandler
super.outputStreamHolder=outputStreamHolder;
|
Methods Summary |
---|
public void | addDirEntry(java.lang.String dirPath)Add directory entry into outputstream.
try{
JarEntry newEntry = new JarEntry(dirPath);
newEntry.setSize(0);
addEntry(newEntry, null);
}catch(ZipException e){
//ignore duplicate directory entry exceptions.
}
| public void | addEntry(java.util.jar.JarEntry targetEntry, byte[] entryBytes)Write entry bytes into target, this method is usually called if class has been tranformed
outputStreamHolder.putNextEntry(targetEntry);
if(entryBytes!=null){
outputStreamHolder.write(entryBytes);
}
outputStreamHolder.closeEntry();
| public void | addEntry(java.io.InputStream jis, java.util.jar.JarEntry entry)Write entry into target, this method usually copy original class into target.
outputStreamHolder.putNextEntry(entry);
if(!entry.isDirectory()){
readwriteStreams(jis,outputStreamHolder);
}
outputStreamHolder.closeEntry();
|
|