Version: 2.9.4
Public Member Functions
wxTarInputStream Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/tarstrm.h>

Inheritance diagram for wxTarInputStream:

Detailed Description

Input stream for reading tar files.

wxTarInputStream::GetNextEntry() returns a wxTarEntry object containing the meta-data for the next entry in the tar (and gives away ownership). Reading from the wxTarInputStream then returns the entry's data. wxTarInputStream::Eof() becomes true after an attempt has been made to read past the end of the entry's data.

When there are no more entries, wxTarInputStream::GetNextEntry() returns NULL and sets wxTarInputStream::Eof().

Tar entries are seekable if the parent stream is seekable. In practice this usually means they are only seekable if the tar is stored as a local file and is not compressed.

Library:  wxBase
Category:  Archive support, Streams
参照:
Looking Up an Archive Entry by Name

Public Member Functions

bool CloseEntry ()
 Closes the current entry.
wxTarEntryGetNextEntry ()
 Closes the current entry if one is open, then reads the meta-data for the next entry and returns it in a wxTarEntry object, giving away ownership.
bool OpenEntry (wxTarEntry &entry)
 Closes the current entry if one is open, then opens the entry specified by the entry object.
 wxTarInputStream (wxInputStream &stream, wxMBConv &conv=wxConvLocal)
 Constructor.
 wxTarInputStream (wxInputStream *stream, wxMBConv &conv=wxConvLocal)
 Constructor.

List of all members.


Constructor & Destructor Documentation

wxTarInputStream::wxTarInputStream ( wxInputStream stream,
wxMBConv conv = wxConvLocal 
)

Constructor.

In a Unicode build the second parameter conv is used to translate fields from the standard tar header into Unicode.

It has no effect on the stream's data. conv is only used for the standard tar headers, any pax extended headers are always UTF-8 encoded.

If the parent stream is passed as a pointer then the new filter stream takes ownership of it. If it is passed by reference then it does not.

wxTarInputStream::wxTarInputStream ( wxInputStream stream,
wxMBConv conv = wxConvLocal 
)

Constructor.

In a Unicode build the second parameter conv is used to translate fields from the standard tar header into Unicode.

It has no effect on the stream's data. conv is only used for the standard tar headers, any pax extended headers are always UTF-8 encoded.

If the parent stream is passed as a pointer then the new filter stream takes ownership of it. If it is passed by reference then it does not.


Member Function Documentation

bool wxTarInputStream::CloseEntry ( ) [virtual]

Closes the current entry.

On a non-seekable stream reads to the end of the current entry first.

Implements wxArchiveInputStream.

wxTarEntry* wxTarInputStream::GetNextEntry ( )

Closes the current entry if one is open, then reads the meta-data for the next entry and returns it in a wxTarEntry object, giving away ownership.

The stream is then open and can be read.

Reimplemented from wxArchiveInputStream.

bool wxTarInputStream::OpenEntry ( wxTarEntry entry)

Closes the current entry if one is open, then opens the entry specified by the entry object.

entry should be from the same tar file, and the tar should be on a seekable stream.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines