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