TWebFile


class description - source file - inheritance tree

class TWebFile : public TFile

    private:
TWebFile TWebFile() void Init(Bool_t) public:
TWebFile TWebFile(const char* url) TWebFile TWebFile(TUrl url) virtual void ~TWebFile() static TClass* Class() virtual Seek_t GetSize() const virtual TClass* IsA() const virtual Bool_t IsOpen() const virtual Bool_t ReadBuffer(char* buf, Int_t len) virtual Int_t ReOpen(Option_t* mode) virtual void Seek(Seek_t offset, TFile::ERelativeTo pos = kBeg) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
TUrl fUrl URL of file Seek_t fOffset seek offset

Class Description

                                                                      
 TWebFile                                                             
                                                                      
 A TWebFile is like a normal TFile except that it reads its data      
 via a (slightly modified) apache web server. A TWebFile is a         
 read-only file.                                                      
                                                                      


TWebFile(const char *url) : TFile(url, "WEB"), fUrl(url)
 Create a Web file object. A web file is the same as a read-only
 TFile except that it is being read via a HTTP server. The url
 argument must be of the form: http://host.dom.ain/file.root.
 If the file specified in the URL does not exist or is not accessible
 the kZombie bit will be set in the TWebFile object. Use IsZombie()
 to see if the file is accessible. The preferred interface to this
 constructor is via TFile::Open().

TWebFile(TUrl url) : TFile(url.GetUrl(), "WEB"), fUrl(url)
 Create a Web file object. A web file is the same as a read-only
 TFile except that it is being read via a HTTP server. Make sure url
 is a valid TUrl object.
 If the file specified in the URL does not exist or is not accessible
 the kZombie bit will be set in the TWebFile object. Use IsZombie()
 to see if the file is accessible.

void Init(Bool_t)
 Initialize a TWebFile object.

Bool_t IsOpen() const
 A TWebFile that has been correctly constructed is always considered open.

Int_t ReOpen(Option_t *mode)
 Reopen a file with a different access mode, like from READ to
 UPDATE or from NEW, CREATE, RECREATE, UPDATE to READ. Thus the
 mode argument can be either "READ" or "UPDATE". The method returns
 0 in case the mode was successfully modified, 1 in case the mode
 did not change (was already as requested or wrong input arguments)
 and -1 in case of failure, in which case the file cannot be used
 anymore. A TWebFile cannot be reopened in update mode.

Bool_t ReadBuffer(char *buf, Int_t len)
 Read specified byte range from remote file via HTTP daemon. This
 routine connects to the remote host, sends the request and returns
 the buffer. Returns kTRUE in case of error.

void Seek(Seek_t offset, ERelativeTo pos)
 Set position from where to start reading.

Seek_t GetSize() const
 Return maximum file size to by-pass truncation checking.



Inline Functions


           TWebFile TWebFile(TUrl url)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
               void ~TWebFile()


Author: Fons Rademakers 17/01/97
Last update: root/net:$Name: $:$Id: TWebFile.cxx,v 1.6 2002/12/10 12:11:31 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.