DWFCore::DWFUnzippingInputStream Class Reference

#include "dwfcore/UnzippingInputStream.h"

Inheritance diagram for DWFCore::DWFUnzippingInputStream:

Inheritance graph
[legend]
Collaboration diagram for DWFCore::DWFUnzippingInputStream:

Collaboration graph
[legend]
List of all members.

Detailed Description

An input stream object that uses the zip library to extract file data from an archive.

Since:
1.0.1

Definition at line 48 of file UnzippingInputStream.h.

Public Member Functions

_DWFCORE_API DWFUnzippingInputStream (unzFile pUnzipStream) throw ()
virtual _DWFCORE_API ~DWFUnzippingInputStream () throw ()
_DWFCORE_API void open (const DWFString &zArchivedFile, const DWFString &zPassword="") throw ( DWFException )
_DWFCORE_API size_t available () const throw ( DWFException )
_DWFCORE_API size_t read (void *pBuffer, size_t nBytesToRead) throw ( DWFException )
_DWFCORE_API off_t seek (int eOrigin, off_t nOffset) throw ( DWFException )
virtual _DWFCORE_API void notifyOwnerChanged (DWFOwnable &rOwnable) throw ( DWFException )
virtual _DWFCORE_API void notifyOwnableDeletion (DWFOwnable &rOwnable) throw ( DWFException )


Constructor & Destructor Documentation

_DWFCORE_API DWFCore::DWFUnzippingInputStream::DWFUnzippingInputStream unzFile  pUnzipStream  )  throw ()
 

Constructor

Parameters:
pUnzipStream This data structure representing the file stream is obtained from the zip library.
Exceptions:
None 

virtual _DWFCORE_API DWFCore::DWFUnzippingInputStream::~DWFUnzippingInputStream  )  throw () [virtual]
 

Destructor

Exceptions:
None 


Member Function Documentation

_DWFCORE_API size_t DWFCore::DWFUnzippingInputStream::available  )  const throw ( DWFException ) [virtual]
 

Used to determine the availablity of data that can be provided by the stream. This method is not required to report the exact number of bytes that will be obtain from a subsequent read() invocation. This method must report zero bytes once the stream data has been expired. Once this method returns zero, it may never again report a non-zero value.

Returns:
The number of bytes available to read from the stream.
Exceptions:
DWFException 
The number of bytes is based on the uncompressed file size.

Implements DWFCore::DWFInputStream.

virtual _DWFCORE_API void DWFCore::DWFUnzippingInputStream::notifyOwnableDeletion DWFOwnable rOwnable  )  throw ( DWFException ) [virtual]
 

This callback notification is made when a previously owned object is about to be destroyed. This method will not be invoked if the ownership change was made with DWFOwnable::disown() with bForget set to true.

Note:
The current object owner is not notified through this method. Obviously, the owner ought be the only one deleting the ownable.
Parameters:
rOwnable The object being deleted.
Exceptions:
DWFException 

Reimplemented from DWFCore::DWFOwner.

virtual _DWFCORE_API void DWFCore::DWFUnzippingInputStream::notifyOwnerChanged DWFOwnable rOwnable  )  throw ( DWFException ) [virtual]
 

This callback notification is made when the ownership of an owned object changes. This owner should take whatever action is necessary to respond to the status change.

Parameters:
rOwnable The object now owned by a different owner.
Exceptions:
DWFException 

Reimplemented from DWFCore::DWFOwner.

_DWFCORE_API void DWFCore::DWFUnzippingInputStream::open const DWFString zArchivedFile,
const DWFString zPassword = ""
throw ( DWFException )
 

Prepares the stream to extract the given file data from the archive.

Parameters:
zArchivedFile The full path name of the file in the archive.
zPassword The password required to access the protected zip archive.
Exceptions:
DWFException 

_DWFCORE_API size_t DWFCore::DWFUnzippingInputStream::read void *  pBuffer,
size_t  nBytesToRead
throw ( DWFException ) [virtual]
 

Reads at most nBytesToRead from the stream into the buffer provided. The stream is not required to fill the read buffer but it must always report the number of bytes, including zero, that were obtained.

Parameters:
pBuffer A pointer to a block of memory to receive the bytes. Any implementation receiving a NULL buffer pointer should throw a DWFInvalidArgumentException.
nBytesToRead The number of bytes to copy into pBuffer. This value should not exceed the capacity of the memory block at pBuffer.
Returns:
The number of actual bytes read.
Exceptions:
DWFException 

Implements DWFCore::DWFInputStream.

_DWFCORE_API off_t DWFCore::DWFUnzippingInputStream::seek int  eOrigin,
off_t  nOffset
throw ( DWFException ) [virtual]
 

Repositions the internal cursor for subsequent read invocations. Not all implementations will support this method; it is recommended that a DWFNotImplementedException be thrown if not.

Warning:
This method may not be supported by all streams.
Parameters:
eOrigin One of SEEK_SET, SEEK_CUR or SEEK_END.
nOffset The number of bytes from eOrigin to move the internal cursor.
Returns:
The previous cursor offset before the seek.
Exceptions:
DWFException 

Implements DWFCore::DWFInputStream.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:39:43 2009 for Autodesk DWF Core Library by  doxygen 1.4.5