org.apache.commons.javaflow.utils
Class RewritingUtils

java.lang.Object
  extended by org.apache.commons.javaflow.utils.RewritingUtils

public final class RewritingUtils
extends java.lang.Object


Nested Class Summary
static interface RewritingUtils.Matcher
           
 
Constructor Summary
RewritingUtils()
           
 
Method Summary
static int copy(java.io.InputStream in, java.io.OutputStream out)
          Copies the entire InputStream to the given OutputStream.
static void main(java.lang.String[] args)
           
static void rewriteClassFile(java.io.File pInput, ResourceTransformer transformer, java.io.File pOutput)
           
static boolean rewriteJar(java.util.jar.JarInputStream pInput, ResourceTransformer transformer, java.util.jar.JarOutputStream pOutput)
           
static boolean rewriteJar(java.util.jar.JarInputStream pInput, ResourceTransformer transformer, java.util.jar.JarOutputStream pOutput, RewritingUtils.Matcher pMatcher)
           
static byte[] toByteArray(java.io.File f)
           
static byte[] toByteArray(java.io.InputStream in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RewritingUtils

public RewritingUtils()
Method Detail

rewriteClassFile

public static void rewriteClassFile(java.io.File pInput,
                                    ResourceTransformer transformer,
                                    java.io.File pOutput)
                             throws java.io.IOException
Throws:
java.io.IOException

rewriteJar

public static boolean rewriteJar(java.util.jar.JarInputStream pInput,
                                 ResourceTransformer transformer,
                                 java.util.jar.JarOutputStream pOutput)
                          throws java.io.IOException
Throws:
java.io.IOException

rewriteJar

public static boolean rewriteJar(java.util.jar.JarInputStream pInput,
                                 ResourceTransformer transformer,
                                 java.util.jar.JarOutputStream pOutput,
                                 RewritingUtils.Matcher pMatcher)
                          throws java.io.IOException
Throws:
java.io.IOException

toByteArray

public static byte[] toByteArray(java.io.File f)
                          throws java.io.IOException
Throws:
java.io.IOException

toByteArray

public static byte[] toByteArray(java.io.InputStream in)
                          throws java.io.IOException
Throws:
java.io.IOException

copy

public static int copy(java.io.InputStream in,
                       java.io.OutputStream out)
                throws java.io.IOException
Copies the entire InputStream to the given OutputStream.

Returns:
the number of bytes copied.
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.io.FileNotFoundException,
                        java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException


Copyright 2004-2008 The Apache Software Foundation. All Rights Reserved.