|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.adobe.icc.dbforms.util.TempFileManager
public class TempFileManager
Field Summary | |
---|---|
static java.lang.String |
TEMP_FILE_PREFIX
|
static java.lang.String |
TEMP_FILE_SUFFIX
|
Constructor Summary | |
---|---|
TempFileManager()
|
Method Summary | |
---|---|
void |
cleanTemp()
Clean the files created within the temp folder. |
java.lang.String |
createTempFileInRepository(java.io.InputStream inputStream,
java.lang.String mimeType)
Creates a temporary file in repository and returns the file to the path. |
java.lang.String |
getTmpfolder()
|
static boolean |
nodeExists(java.lang.String absPath)
|
byte[] |
readFile(java.lang.String fileName)
Read a file (for upload) and return as byte array |
static byte[] |
retrieveContentFromJCRRepository(java.lang.String absPath)
Retrieves bytes of a file in JCR repository (CRX) |
static byte[] |
retrieveContentFromJCRRepository(java.lang.String absPath,
boolean deleteFile)
Retrieves bytes of a file in JCR repository (CRX) |
static byte[] |
retrieveContentFromJCRRepository(java.lang.String absPath,
boolean deleteFile,
Session session)
Retrieves bytes of a file in JCR repository (CRX) |
void |
setTmpfolder(java.lang.String folder)
|
java.io.File |
writeTempFile(java.lang.String name)
Write a file and return as File object |
java.io.File |
writeTempFile(java.lang.String name,
java.lang.String suffix)
Write a file and return as File object |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TEMP_FILE_PREFIX
public static final java.lang.String TEMP_FILE_SUFFIX
Constructor Detail |
---|
public TempFileManager()
Method Detail |
---|
public java.lang.String createTempFileInRepository(java.io.InputStream inputStream, java.lang.String mimeType) throws ICCException
InputStream
- mimeType
-
ICCException
public void cleanTemp()
public java.io.File writeTempFile(java.lang.String name) throws ICCException
name
- name of file
ICCException
public java.io.File writeTempFile(java.lang.String name, java.lang.String suffix) throws ICCException
name
- name of filesuffix
- suffix for the temp file
ICCException
public byte[] readFile(java.lang.String fileName) throws ICCException, java.io.IOException
directory
- path to folder where file residesfileName
- name of file
java.io.IOException
ICCException
public java.lang.String getTmpfolder()
public void setTmpfolder(java.lang.String folder)
public static byte[] retrieveContentFromJCRRepository(java.lang.String absPath) throws ICCException, java.io.IOException
absPath
- - Path of the file in CRX. The path should begin from root of the repository (i.e. path after the hostname:port)
java.io.IOException
ICCException
public static byte[] retrieveContentFromJCRRepository(java.lang.String absPath, boolean deleteFile) throws ICCException, java.io.IOException
absPath
- - Path of the file in CRX. The path should begin from root of the repository (i.e. path after the hostname:port)deleteFile
- - deletes the file after content retrieval
java.io.IOException
ICCException
public static byte[] retrieveContentFromJCRRepository(java.lang.String absPath, boolean deleteFile, Session session) throws ICCException, java.io.IOException
absPath
- - Path of the file in CRX. The path should begin from root of the repository (i.e. path after the hostname:port)deleteFile
- - deletes the file after content retrievalsession
- - This session to be used while fetching the absPath content. If null, current session is used
java.io.IOException
ICCException
public static boolean nodeExists(java.lang.String absPath)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |