Class FileUtils
- java.lang.Object
-
- org.bonitasoft.web.client.services.utils.FileUtils
-
public class FileUtils extends Object
- Author:
- Baptiste Mesta.
-
-
Constructor Summary
Constructors Constructor Description FileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]getFileFromZip(File zip, String filePath)static byte[]getFileFromZip(InputStream inputStream, String filePath)static booleanisBarFile(File file)static booleanisXmlFile(File file)static booleanisZipFile(File file)static Stringread(File file)static byte[]readFully(File file)static byte[]readFully(InputStream in)static voidupdateFileContent(File zip, String filePath, InputStream newContent)
-
-
-
Method Detail
-
getFileFromZip
public static byte[] getFileFromZip(File zip, String filePath) throws IOException
- Throws:
IOException
-
updateFileContent
public static void updateFileContent(File zip, String filePath, InputStream newContent) throws IOException
- Throws:
IOException
-
getFileFromZip
public static byte[] getFileFromZip(InputStream inputStream, String filePath) throws IOException
- Throws:
IOException
-
readFully
public static byte[] readFully(InputStream in) throws IOException
- Throws:
IOException
-
read
public static String read(File file) throws IOException
- Throws:
IOException
-
readFully
public static byte[] readFully(File file) throws IOException
- Throws:
IOException
-
isBarFile
public static boolean isBarFile(File file)
-
isXmlFile
public static boolean isXmlFile(File file)
-
isZipFile
public static boolean isZipFile(File file)
-
-