Class AbstractStaticWeaveOutputHandler
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.weaving.AbstractStaticWeaveOutputHandler
-
- Direct Known Subclasses:
StaticWeaveDirectoryOutputHandler,StaticWeaveJAROutputHandler
public abstract class AbstractStaticWeaveOutputHandler extends java.lang.ObjectThe abstract class provides a set of methods to out outputs into the sepcified archive file.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.jar.JarOutputStreamoutputStreamHolder
-
Constructor Summary
Constructors Constructor Description AbstractStaticWeaveOutputHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidaddDirEntry(java.lang.String dirPath)create directory into target directory, or insert directory entry into outputstream.abstract voidaddEntry(java.io.InputStream jis, java.util.jar.JarEntry entry)Write entry into target, this method usually copy original class into target.abstract voidaddEntry(java.util.jar.JarEntry targetEntry, byte[] entryBytes)Write entry bytes into target, this is usually called if class has been tranformedvoidcloseOutputStream()Close the output stream.java.util.jar.JarOutputStreamgetOutputStream()Get the ouput stream instance.protected voidreadwriteStreams(java.io.InputStream in, java.io.OutputStream out)
-
-
-
Method Detail
-
addDirEntry
public abstract void addDirEntry(java.lang.String dirPath) throws java.io.IOExceptioncreate directory into target directory, or insert directory entry into outputstream.- Parameters:
dirPath-- Throws:
java.io.IOException
-
addEntry
public abstract void addEntry(java.util.jar.JarEntry targetEntry, byte[] entryBytes) throws java.io.IOExceptionWrite entry bytes into target, this is usually called if class has been tranformed- Parameters:
targetEntry-entryBytes-- Throws:
java.io.IOException
-
addEntry
public abstract void addEntry(java.io.InputStream jis, java.util.jar.JarEntry entry) throws java.io.IOException, java.net.URISyntaxExceptionWrite entry into target, this method usually copy original class into target.- Parameters:
jis-entry-- Throws:
java.io.IOExceptionjava.net.URISyntaxException
-
closeOutputStream
public void closeOutputStream() throws java.io.IOExceptionClose the output stream.- Throws:
java.io.IOException
-
getOutputStream
public java.util.jar.JarOutputStream getOutputStream()
Get the ouput stream instance.- Returns:
-
readwriteStreams
protected void readwriteStreams(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException- Throws:
java.io.IOException
-
-