public class EAPFileUtils extends Object
| Constructor and Description |
|---|
EAPFileUtils() |
| Modifier and Type | Method and Description |
|---|---|
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) |
public static void writeToFile(InputStream inputStream, FileOutputStream outputStream) throws IOException
IOExceptionpublic static void writeToFile(InputStream inputStream, String fileNem) throws IOException
IOExceptionpublic static void writeToFile(String str, File f) throws IOException
IOExceptionpublic static void writeToFile(String str, String fileName) throws IOException
IOExceptionpublic static void writeToFile(InputStream inputStream, File file) throws IOException
IOExceptionpublic static File writeFile(File path, String fileName, String fileContent) throws IOException
IOExceptionpublic static void removeFirstLineIfDuplicated(File path) throws IOException
IOExceptionpublic static String getStringFromInputStream(InputStream is) throws Exception
Exceptionpublic static File createJarFile(String outPath, String fileName, File fileToAdd, String entryName) throws IOException
fileToAdd into the JAR.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.IOExceptionCopyright © 2001–2016 JBoss by Red Hat. All rights reserved.