FileDocCategorySizeDatePackage
AbstractStaticWeaveOutputHandler.javaAPI DocGlassfish v2 API4073Tue May 22 16:54:44 BST 2007oracle.toplink.essentials.internal.weaving

AbstractStaticWeaveOutputHandler

public abstract class AbstractStaticWeaveOutputHandler extends Object
The abstract class provides a set of methods to out outputs into the sepcified archive file.

Fields Summary
protected JarOutputStream
outputStreamHolder
Constructors Summary
Methods Summary
public abstract voidaddDirEntry(java.lang.String dirPath)
create directory into target directory, or insert directory entry into outputstream.

param
dirPath
throws
IOException

public abstract voidaddEntry(java.util.jar.JarEntry targetEntry, byte[] entryBytes)
Write entry bytes into target, this is usually called if class has been tranformed

param
targetEntry
param
entryBytes
throws
IOException

public abstract voidaddEntry(java.io.InputStream jis, java.util.jar.JarEntry entry)
Write entry into target, this method usually copy original class into target.

param
jis
param
entry
throws
IOException

public voidcloseOutputStream()
Close the output stream.

throws
IOException

    
                        
         
    
                             
          
    
                           
           

    
               
         
        if(outputStreamHolder!=null){
            outputStreamHolder.close();
        }
    
public java.util.jar.JarOutputStreamgetOutputStream()
Get the ouput stream instance.

return

        return this.outputStreamHolder;
    
protected voidreadwriteStreams(java.io.InputStream in, java.io.OutputStream out)

        int numRead;
        byte[] buffer = new byte[8*1024];

        while ((numRead = in.read(buffer,0,buffer.length)) != -1) {
            out.write(buffer,0,numRead);
        }