KIE EAP - Maven plugin 6.1.0.Final

org.kie.integration.eap.maven.util
Class EAPFileUtils

java.lang.Object
  extended by org.kie.integration.eap.maven.util.EAPFileUtils

public class EAPFileUtils
extends Object


Constructor Summary
EAPFileUtils()
           
 
Method Summary
static File createJarFile(String outPath, String fileName, File fileToAdd, String entryName)
          Creates a JAR file and add the file fileToAdd into the JAR.
static String extractFileName(String path)
           
static String getStringFromInputStream(InputStream is)
           
static void removeFirstLineIfDuplicated(File path)
           
static File writeFile(File path, String fileName, String fileContent)
           
static void writeToFile(InputStream inputStream, File file)
           
static void writeToFile(InputStream inputStream, FileOutputStream outputStream)
           
static void writeToFile(InputStream inputStream, String fileNem)
           
static void writeToFile(String str, File f)
           
static void writeToFile(String str, String fileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EAPFileUtils

public EAPFileUtils()
Method Detail

writeToFile

public static void writeToFile(InputStream inputStream,
                               FileOutputStream outputStream)
                        throws IOException
Throws:
IOException

writeToFile

public static void writeToFile(InputStream inputStream,
                               String fileNem)
                        throws IOException
Throws:
IOException

writeToFile

public static void writeToFile(String str,
                               File f)
                        throws IOException
Throws:
IOException

writeToFile

public static void writeToFile(String str,
                               String fileName)
                        throws IOException
Throws:
IOException

writeToFile

public static void writeToFile(InputStream inputStream,
                               File file)
                        throws IOException
Throws:
IOException

writeFile

public static File writeFile(File path,
                             String fileName,
                             String fileContent)
                      throws IOException
Throws:
IOException

removeFirstLineIfDuplicated

public static void removeFirstLineIfDuplicated(File path)
                                        throws IOException
Throws:
IOException

extractFileName

public static String extractFileName(String path)

getStringFromInputStream

public static String getStringFromInputStream(InputStream is)
                                       throws Exception
Throws:
Exception

createJarFile

public static File createJarFile(String outPath,
                                 String fileName,
                                 File fileToAdd,
                                 String entryName)
                          throws IOException
Creates a JAR file and add the file fileToAdd into the JAR.

Parameters:
outPath - The output directory for the JAR file.
fileName - The JAR file name.
fileToAdd - The file to add into the JAR.
entryName - The JAR entry name of the file to add into the JAR.
Returns:
The generated JAR file.
Throws:
IOException

KIE EAP - Maven plugin 6.1.0.Final

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.