• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE Support
  • Sitemap
  • Contact Us
 

strigi/src/streams

Strigi::TarInputStream

Strigi::TarInputStream Class Reference

Implementation of SubStreamProvider for reading the tar format. More...

#include <tarinputstream.h>

Inheritance diagram for Strigi::TarInputStream:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 TarInputStream (InputStream *input)
 ~TarInputStream ()
InputStream * nextEntry ()

Static Public Member Functions

static bool checkHeader (const char *data, int32_t datasize)
static SubStreamProvider * factory (InputStream *input)

Detailed Description

Implementation of SubStreamProvider for reading the tar format.

The InputStream recognizes this format:

  • tar archive is composed of blocks of 512 bytes. Every file and every header starts at an offset of a multiple of 512.
  • each file starts with a header of size 512.
  • up to 100 bytes of filename at offset 0 of file header
  • file size is given in 7 bytes of octal format starting at position 124 of the file header
  • if the filename is '././@LongLink' then this block contains the length of the file name at position 124. The next blocks contain the filename. The block after that is the real header with the file size and only then does the file contents start.

http://www.gnu.org/software/tar/manual/html_node/Standard.html

Definition at line 42 of file tarinputstream.h.


Constructor & Destructor Documentation

TarInputStream::TarInputStream ( InputStream *  input  )  [explicit]

Definition at line 29 of file tarinputstream.cpp.

TarInputStream::~TarInputStream (  ) 

Definition at line 33 of file tarinputstream.cpp.


Member Function Documentation

bool TarInputStream::checkHeader ( const char *  data,
int32_t  datasize 
) [static]

Definition at line 60 of file tarinputstream.cpp.

static SubStreamProvider* Strigi::TarInputStream::factory ( InputStream *  input  )  [inline, static]

Definition at line 57 of file tarinputstream.h.

InputStream * TarInputStream::nextEntry (  )  [virtual]

Get the next substream.

This function should return a stream representing the next substream that can be read from the input stream, or 0 if there are no more substreams.

For example, if the input stream were a tar archive, it would return a stream representing the next file or directory in the archive.

It should also load the substream (the same one that was returned) into entrystream, and set entryinfo to an EntryInfo giving information about the substream.

If there may be more substreams, but an error occurred, 0 should be returned, the status should be set to Error and an error message should be set.

Returns:
the next substream, or 0 if there are no more substreams or an error occurred

Implements Strigi::SubStreamProvider.

Definition at line 36 of file tarinputstream.cpp.


The documentation for this class was generated from the following files:
  • tarinputstream.h
  • tarinputstream.cpp

strigi/src/streams

Skip menu "strigi/src/streams"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

KDE Support

Skip menu "KDE Support"
  • akonadi
  • Decibel
  • grantlee
  • kdewin
  • phonon
  •     Backend
  • polkit-qt
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for KDE Support by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal