Class ArchiveReader
java.lang.Object
org.eclipse.birt.core.archive.compound.ArchiveReader
- All Implemented Interfaces:
IDocArchiveReader
- Direct Known Subclasses:
FileArchiveReader
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
This function must be called after the reader is used.boolean
getInputStream
(String relativePath) getName()
returns a sequential access file.get all the stream in the archive file.listStreams
(String namePattern) try to lock the streamvoid
open()
This functiona must be called before the reader is used.void
unlock the stream locked by the object.
-
Field Details
-
archive
-
-
Constructor Details
-
ArchiveReader
- Throws:
IOException
-
ArchiveReader
- Throws:
IOException
-
-
Method Details
-
close
Description copied from interface:IDocArchiveReader
This function must be called after the reader is used. close the archive.- Specified by:
close
in interfaceIDocArchiveReader
- Throws:
IOException
-
getArchive
-
exists
- Specified by:
exists
in 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
-
getName
- Specified by:
getName
in interfaceIDocArchiveReader
- Returns:
- the archive name
-
getStream
Description copied from interface:IDocArchiveReader
returns a sequential access file.- Specified by:
getStream
in 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:
getInputStream
in interfaceIDocArchiveReader
- Throws:
IOException
-
listAllStreams
Description copied from interface:IDocArchiveReader
get all the stream in the archive file.- Specified by:
listAllStreams
in interfaceIDocArchiveReader
- Returns:
- Throws:
IOException
-
listStreams
- Specified by:
listStreams
in interfaceIDocArchiveReader
- Parameters:
namePattern
- - 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
-
open
Description copied from interface:IDocArchiveReader
This 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:
open
in interfaceIDocArchiveReader
- Throws:
IOException
-
lock
Description copied from interface:IDocArchiveReader
try to lock the stream- Specified by:
lock
in interfaceIDocArchiveReader
- Returns:
- the locker.
- Throws:
IOException
-
unlock
Description copied from interface:IDocArchiveReader
unlock the stream locked by the object.- Specified by:
unlock
in interfaceIDocArchiveReader
- Parameters:
locker
- object returned by the lock().
-