org.exoplatform.commons.utils
Class ExoExpression

java.lang.Object
  extended by org.exoplatform.commons.utils.ExoExpression

public class ExoExpression
extends Object

Created by The eXo Platform SAS Author : Chung Nguyen nguyenchung136@yahoo.com Feb 8, 2006


Field Summary
protected static int BUFFER
           
static String entryName
           
protected static int EOF
           
static String outFileName
           
static String pathOut
           
 
Constructor Summary
ExoExpression()
           
 
Method Summary
 ZipOutputStream addToArchive(ZipOutputStream zipOutput, InputStream input, String entryName1)
           
 String getDirOut()
           
static String getEntry()
           
 File getFileToByte(ByteArrayInputStream bais)
          Create File with ByteArrInputStrem Zip
static String getOutFileName()
           
static String getPathOut()
           
 ByteArrayInputStream getZipByteToFolder(File input, boolean containParent)
          Mothed accept Zip one Folder and Return ByteArrayInputStream of it after Zip
 ByteArrayInputStream getZipOutputStream(ByteArrayInputStream bais)
          Method create File Zip with
static void setEntry(String entry)
           
static void setOutFileName(String fileName)
           
static void setPathOut(String dir)
           
 ByteArrayInputStream ZipExcute(ByteArrayInputStream bytesStream)
          Method accept Zip one ByteArrayInputStream
 ByteArrayInputStream ZipExcute(File file)
          Method accept Zip one File
 ByteArrayInputStream ZipExcute(InputStream is)
          Method accept Zip one InputStream
 ByteArrayInputStream ZipExcute(String url)
          Method accept download File with URL and Zip it
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EOF

protected static final int EOF
See Also:
Constant Field Values

BUFFER

protected static final int BUFFER
See Also:
Constant Field Values

entryName

public static String entryName

outFileName

public static String outFileName

pathOut

public static String pathOut
Constructor Detail

ExoExpression

public ExoExpression()
Method Detail

ZipExcute

public ByteArrayInputStream ZipExcute(InputStream is)
                               throws Exception
Method accept Zip one InputStream

Parameters:
is - : InputStream
Returns:
: ByteArrayInputStream
Throws:
Exception

ZipExcute

public ByteArrayInputStream ZipExcute(File file)
                               throws Exception
Method accept Zip one File

Parameters:
file - : File input
Returns:
: ByteArrayInputStream
Throws:
Exception - : FileNotFoundException

ZipExcute

public ByteArrayInputStream ZipExcute(ByteArrayInputStream bytesStream)
                               throws Exception
Method accept Zip one ByteArrayInputStream

Parameters:
bytesStream -
Returns:
ByteArrayInputStream
Throws:
Exception

ZipExcute

public ByteArrayInputStream ZipExcute(String url)
                               throws Exception
Method accept download File with URL and Zip it

Parameters:
url -
Returns:
: ByteArrayInputStream
Throws:
Exception

getZipOutputStream

public ByteArrayInputStream getZipOutputStream(ByteArrayInputStream bais)
                                        throws Exception
Method create File Zip with

Throws:
Exception

getFileToByte

public File getFileToByte(ByteArrayInputStream bais)
                   throws Exception
Create File with ByteArrInputStrem Zip

Parameters:
bais -
Returns:
File Zip
Throws:
Exception

setEntry

public static void setEntry(String entry)

getEntry

public static String getEntry()

setOutFileName

public static void setOutFileName(String fileName)
Parameters:
fileName - : Name of File Zip out

getOutFileName

public static String getOutFileName()

setPathOut

public static void setPathOut(String dir)
Parameters:
dir - : Directory Out

getPathOut

public static String getPathOut()

getDirOut

public String getDirOut()
Returns:
Dir of Zip File

getZipByteToFolder

public ByteArrayInputStream getZipByteToFolder(File input,
                                               boolean containParent)
                                        throws Exception
Mothed accept Zip one Folder and Return ByteArrayInputStream of it after Zip

Parameters:
input - : File Folder input
containParent - = true Folder is Parent
Returns:
ByteArrayInputStream after Zip
Throws:
Exception

addToArchive

public ZipOutputStream addToArchive(ZipOutputStream zipOutput,
                                    InputStream input,
                                    String entryName1)
                             throws Exception
Throws:
Exception


Copyright © 2009 eXo Platform SAS. All Rights Reserved.