Package org.alfresco.mock
Class ZipUtils
- java.lang.Object
-
- org.alfresco.mock.ZipUtils
-
public class ZipUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description ZipUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddEntryToZip(String text, String entryName, OutputStream output)static StringgetZipEntryContent(File parent)static StringgetZipEntryContent(File parent, String documentName)static org.alfresco.service.cmr.repository.NodeRefinsertZip(org.alfresco.service.cmr.repository.NodeRef parent, String zipName, String entryName, String text, Map<org.alfresco.service.namespace.QName,Serializable> properties, org.alfresco.service.ServiceRegistry serviceRegistry)static voidunzip(InputStream inputStream, File targetDirectory)
-
-
-
Field Detail
-
TEMP_DIR
public static final File TEMP_DIR
-
-
Method Detail
-
unzip
public static void unzip(InputStream inputStream, File targetDirectory) throws IOException
- Throws:
IOException
-
getZipEntryContent
public static String getZipEntryContent(File parent, String documentName) throws IOException
- Throws:
IOException
-
getZipEntryContent
public static String getZipEntryContent(File parent) throws IOException
- Throws:
IOException
-
addEntryToZip
public static void addEntryToZip(String text, String entryName, OutputStream output) throws IOException
- Throws:
IOException
-
insertZip
public static org.alfresco.service.cmr.repository.NodeRef insertZip(org.alfresco.service.cmr.repository.NodeRef parent, String zipName, String entryName, String text, Map<org.alfresco.service.namespace.QName,Serializable> properties, org.alfresco.service.ServiceRegistry serviceRegistry) throws IOException- Throws:
IOException
-
-