Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

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 47 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 )


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 obtained 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.

_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 May 17 12:05:25 2005 for Autodesk DWF Core Library by  doxygen 1.4.1