wx.Archive.ArchiveOutput Class Reference

Inheritance diagram for wx.Archive.ArchiveOutput:


List of all members.

Public Member Functions

 ArchiveOutput (Uri fileUri, ArchiveEntry.ArchiveType type)
 ArchiveOutput (Uri fileUri)
 ArchiveOutput (wxString filename, ArchiveEntry.ArchiveType type)
 ArchiveOutput (string filename, ArchiveEntry.ArchiveType type)
 ArchiveOutput (string filename)
bool Close ()
bool CopyArchiveMetaData (ArchiveInput input)
bool CopyEntry (ArchiveEntry entry, ArchiveInput input)
override void Dispose ()
bool PutNextDirEntry (string name, DateTime timestamp)
bool PutNextDirEntry (string name)
bool PutNextEntry (string name, DateTime timestamp)
bool PutNextEntry (string name)


bool IsOk [get]
Stream Out [get]
ArchiveEntry.ArchiveType Type [get]


class  ZipOutStream

Detailed Description

Writing into an archive file type supported by wxWidgets. wxWidgets supports reading, analyzing, and writing archive files. Currently only ZIP archives are supported. Corresponding features are only partially supported by the standard .NET framework since 2.0.

The interface of this class differs strongly from the wxWidgets API since this API shall be extendable to use standard .NET framework classes where possible. Additionally, we cannot inherit from both, wx.Object and Stream.

Archive formats such as zip

Constructor & Destructor Documentation

wx.Archive.ArchiveOutput.ArchiveOutput ( string  filename  ) 

wx.Archive.ArchiveOutput.ArchiveOutput ( string  filename,
ArchiveEntry.ArchiveType  type 

wx.Archive.ArchiveOutput.ArchiveOutput ( wxString  filename,
ArchiveEntry.ArchiveType  type 

wx.Archive.ArchiveOutput.ArchiveOutput ( Uri  fileUri  ) 

This consumes an URI pointing at a local file. Raises currently an ArgumentException if the argument is not a local file name.

wx.Archive.ArchiveOutput.ArchiveOutput ( Uri  fileUri,
ArchiveEntry.ArchiveType  type 

This consumes an URI pointing at a local file. Raises currently an ArgumentException if the argument is not a local file name.

Member Function Documentation

bool wx.Archive.ArchiveOutput.Close (  ) 

This closes the whole archive and returns true in case of success.

bool wx.Archive.ArchiveOutput.CopyArchiveMetaData ( ArchiveInput  input  ) 

* Some archive formats have additional meta-data that applies to the archive as a whole. For example in the case of zip there is a comment, which is stored at the end of the zip file. CopyArchiveMetaData() can be used to transfer such information when writing a modified copy of an archive.

Since the position of the meta-data can vary between the various archive formats, it is best to call CopyArchiveMetaData() before transferring the entries. The wx.ArchiveOutput will then hold on to the meta-data and write it at the correct point in the output file.

When the input archive is being read from a non-seekable stream, the meta-data may not be available when CopyArchiveMetaData() is called, in which case the two streams set up a link and transfer the data when it becomes available.

bool wx.Archive.ArchiveOutput.CopyEntry ( ArchiveEntry  entry,
ArchiveInput  input 

* Takes ownership of entry and uses it to create a new entry in the archive. Entry is then opened in the input stream stream and its contents copied to this stream. For archive types which compress entry data, CopyEntry() is likely to be much more efficient than transferring the data using Read() and Write() since it will copy them without decompressing and recompressing them. entry must be from the same archive file that stream is accessing. For non-seekable streams, entry must also be the last thing read from stream.

override void wx.Archive.ArchiveOutput.Dispose (  )  [virtual]

Reimplemented from wx.Object.

bool wx.Archive.ArchiveOutput.PutNextDirEntry ( string  name,
DateTime  timestamp 

bool wx.Archive.ArchiveOutput.PutNextDirEntry ( string  name  ) 

bool wx.Archive.ArchiveOutput.PutNextEntry ( string  name,
DateTime  timestamp 

bool wx.Archive.ArchiveOutput.PutNextEntry ( string  name  ) 

Sets Out() to a fill a new entry of the provided name. If Out() has been already non-null before, the previous stream on the entry will be closed.

Property Documentation

bool wx.Archive.ArchiveOutput.IsOk [get]

Stream wx.Archive.ArchiveOutput.Out [get]

This is the stream to write into the current entry of the archive. This is null if we do not have an opened entry. Entries can be opened by PutNextEntry().

ArchiveEntry.ArchiveType wx.Archive.ArchiveOutput.Type [get]

Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads