Class ByteCodeEnhancerHelper
- java.lang.Object
-
- com.sun.jdo.api.persistence.enhancer.ByteCodeEnhancerHelper
-
public class ByteCodeEnhancerHelper extends Object
This is a helper-class to perform some useful operations outside a byte code enhancer and delegate the real work to the enhancer.
-
-
Constructor Summary
Constructors Constructor Description ByteCodeEnhancerHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
enhanceClassFile(ByteCodeEnhancer enhancer, InputStream in, OutputStream out)
Enhances a classfile.static boolean
enhanceZipFile(ByteCodeEnhancer enhancer, ZipInputStream zip_in, ZipOutputStream zip_out)
Enhances a zip file.
-
-
-
Method Detail
-
enhanceClassFile
public static final boolean enhanceClassFile(ByteCodeEnhancer enhancer, InputStream in, OutputStream out) throws EnhancerUserException, EnhancerFatalError
Enhances a classfile.- Parameters:
enhancer
- The enhancer to delegate the work to.in
- The input stream with the Java class.out
- The output stream to write the enhanced class to.- Returns:
- Has the input stream been enhanced?
- Throws:
EnhancerUserException
- If something went wrong.EnhancerFatalError
- If something went wrong.- See Also:
ByteCodeEnhancer.enhanceClassFile(java.io.InputStream, java.io.OutputStream)
-
enhanceZipFile
public static final boolean enhanceZipFile(ByteCodeEnhancer enhancer, ZipInputStream zip_in, ZipOutputStream zip_out) throws EnhancerUserException, EnhancerFatalError
Enhances a zip file. The zip file is given as a uip input stream. It's entries are read and - if necessary - individually enhanced. The output stream has the same compression (if any) as the input stream.- Parameters:
enhancer
- The enhancer.zip_in
- The zip input stream.zip_out
- The zip output stream.- Throws:
EnhancerUserException
- If something went wrong.EnhancerFatalError
- If something went wrong.- See Also:
ByteCodeEnhancer.enhanceClassFile(java.io.InputStream, java.io.OutputStream)
-
-