public class ArchiveWriter extends java.lang.Object implements IDocArchiveWriter
Constructor and Description |
---|
ArchiveWriter(IArchiveFile archive) |
ArchiveWriter(java.lang.String archiveName) |
Modifier and Type | Method and Description |
---|---|
RAOutputStream |
createOutputStream(java.lang.String relativePath) |
RAOutputStream |
createRandomAccessStream(java.lang.String relativePath)
Create a random access stream in the archive and return it.
|
boolean |
dropStream(java.lang.String relativePath)
Delete a stream from the archive.
|
boolean |
exists(java.lang.String relativePath) |
void |
finish()
This function must be called after the writer is used.
|
void |
flush()
This function flushs all the buffers in the writer
|
IArchiveFile |
getArchive() |
RAInputStream |
getInputStream(java.lang.String relativePath) |
java.lang.String |
getName() |
RAOutputStream |
getOutputStream(java.lang.String relativePath) |
void |
initialize()
This function must be called before the writer is used.
|
java.util.List<java.lang.String> |
listAllStreams()
get all the stream in the archive file.
|
java.util.List<java.lang.String> |
listStreams(java.lang.String namePattern) |
java.lang.Object |
lock(java.lang.String relativePath)
try to lock the stream
|
RAOutputStream |
openRandomAccessStream(java.lang.String relativePath) |
void |
setStreamSorter(IStreamSorter streamSorter)
Set the stream sorter (if needed).
|
void |
unlock(java.lang.Object locker)
unlock the stream locked by the object.
|
public ArchiveWriter(java.lang.String archiveName) throws java.io.IOException
java.io.IOException
public ArchiveWriter(IArchiveFile archive) throws java.io.IOException
java.io.IOException
public IArchiveFile getArchive()
public RAOutputStream createRandomAccessStream(java.lang.String relativePath) throws java.io.IOException
IDocArchiveWriter
createRandomAccessStream
in interface IDocArchiveWriter
relativePath
- -
relative path to report archive path. The path is based on
Unix syntax, with the root of the archive denoted by "/". The
initial "/" character can be skipped.java.io.IOException
public RAOutputStream openRandomAccessStream(java.lang.String relativePath) throws java.io.IOException
openRandomAccessStream
in interface IDocArchiveWriter
java.io.IOException
public RAOutputStream createOutputStream(java.lang.String relativePath) throws java.io.IOException
createOutputStream
in interface IDocArchiveWriter
java.io.IOException
public RAOutputStream getOutputStream(java.lang.String relativePath) throws java.io.IOException
getOutputStream
in interface IDocArchiveWriter
java.io.IOException
public RAInputStream getInputStream(java.lang.String relativePath) throws java.io.IOException
getInputStream
in interface IDocArchiveWriter
java.io.IOException
public boolean dropStream(java.lang.String relativePath)
IDocArchiveWriter
dropStream
in interface IDocArchiveWriter
relativePath
- -
the relative path of the streampublic boolean exists(java.lang.String relativePath)
exists
in interface IDocArchiveWriter
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.public void finish() throws java.io.IOException
IDocArchiveWriter
finish
in interface IDocArchiveWriter
java.io.IOException
public void flush() throws java.io.IOException
IDocArchiveWriter
flush
in interface IDocArchiveWriter
java.io.IOException
public java.lang.String getName()
getName
in interface IDocArchiveWriter
public void initialize() throws java.io.IOException
IDocArchiveWriter
initialize
in interface IDocArchiveWriter
java.io.IOException
public void setStreamSorter(IStreamSorter streamSorter)
IDocArchiveWriter
setStreamSorter
in interface IDocArchiveWriter
streamSorter
- -
the stream sorterpublic java.lang.Object lock(java.lang.String relativePath) throws java.io.IOException
IDocArchiveWriter
lock
in interface IDocArchiveWriter
java.io.IOException
public void unlock(java.lang.Object locker)
IDocArchiveWriter
unlock
in interface IDocArchiveWriter
locker
- object returned by the lock().public java.util.List<java.lang.String> listAllStreams() throws java.io.IOException
IDocArchiveWriter
listAllStreams
in interface IDocArchiveWriter
java.io.IOException
public java.util.List<java.lang.String> listStreams(java.lang.String namePattern) throws java.io.IOException
listStreams
in interface IDocArchiveWriter
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.java.io.IOException
Copyright © 2014 OpenText Corp. All rights reserved.