Package org.eclipse.birt.core.archive
Class FolderArchiveReader
java.lang.Object
org.eclipse.birt.core.archive.FolderArchiveReader
- All Implemented Interfaces:
IDocArchiveReader
-
Constructor Summary
ConstructorsConstructorDescriptionFolderArchiveReader(String folderName) FolderArchiveReader(String folderName, boolean contentEscape) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()This function must be called after the reader is used.booleangetInputStream(String relativePath) getName()return the folder name as the report archive namereturns a sequential access file.get all the stream in the archive file.listStreams(String relativeStoragePath) return a list of strings which are the relative path of streamstry to lock the streamvoidopen()This functiona must be called before the reader is used.voidunlock the stream locked by the object.
-
Constructor Details
-
FolderArchiveReader
- Parameters:
folderName-contentEscape- old document should be false.- Throws:
IOException
-
FolderArchiveReader
- Parameters:
folderName- - the absolute name of the folder archive- Throws:
IOException
-
-
Method Details
-
getName
return the folder name as the report archive name- Specified by:
getNamein interfaceIDocArchiveReader- Returns:
- the archive name
-
open
public void open()Description copied from interface:IDocArchiveReaderThis functiona must be called before the reader is used. initialize the document archive. For example, the index stream mey be read into memory.- Specified by:
openin interfaceIDocArchiveReader
-
close
Description copied from interface:IDocArchiveReaderThis function must be called after the reader is used. close the archive.- Specified by:
closein interfaceIDocArchiveReader- Throws:
IOException
-
getStream
Description copied from interface:IDocArchiveReaderreturns a sequential access file.- Specified by:
getStreamin interfaceIDocArchiveReader- Parameters:
relativePath- - the relative stream path in the archive. The relative path is based on Unix syntax, with the root of the archive denoted by "/". The initial "/" character can be skipped. Used mainly for sequential streams in report.- Returns:
- RAInputStream
- Throws:
IOException
-
getInputStream
- Specified by:
getInputStreamin interfaceIDocArchiveReader- Throws:
IOException
-
exists
- Specified by:
existsin interfaceIDocArchiveReader- Parameters:
relativePath- - the relative stream path in the archive. The relative path is based on Unix syntax, with the root of the archive denoted by "/". The initial "/" character can be skipped. Used mainly for sequential streams in report.- Returns:
- whether the stream exist
-
listStreams
return a list of strings which are the relative path of streams- Specified by:
listStreamsin interfaceIDocArchiveReader- Parameters:
relativeStoragePath- - the relative stream path in the archive. The relative path is based on Unix syntax, with the root of the archive denoted by "/". The initial "/" character can be skipped.- Returns:
- a list of strings representing the underlying stream names. The return values are in the relative path format too.
- Throws:
IOException
-
listAllStreams
Description copied from interface:IDocArchiveReaderget all the stream in the archive file.- Specified by:
listAllStreamsin interfaceIDocArchiveReader- Returns:
- Throws:
IOException
-
lock
Description copied from interface:IDocArchiveReadertry to lock the stream- Specified by:
lockin interfaceIDocArchiveReader- Returns:
- the locker.
- Throws:
IOException
-
unlock
Description copied from interface:IDocArchiveReaderunlock the stream locked by the object.- Specified by:
unlockin interfaceIDocArchiveReader- Parameters:
lock- object returned by the lock().
-