URLInputStream Class Reference
[IO: Local and Remote]

#include <URLInputStream.h>

Inheritance diagram for URLInputStream:

Inheritance graph
[legend]
Collaboration diagram for URLInputStream:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void Close ()
 Closes the stream if it is not already closed. All system resources used by the stream are released.
virtual std::string GetLocation () const
virtual bool IsDone () const
virtual bool IsOpen () const
virtual char Peek ()
virtual char Read ()
 URLInputStream (const std::string &url)
virtual ~URLInputStream ()


Detailed Description

InputStream that can handle both file and http url's.
Examples:

printer.cpp.

Definition at line 9 of file URLInputStream.h.


Constructor & Destructor Documentation

URLInputStream::URLInputStream ( const std::string &  url  ) 

Parameters:
url A valid URL using the file: or http: scheme

Definition at line 24 of file URLInputStream.cpp.

URLInputStream::~URLInputStream (  )  [virtual]

Definition at line 29 of file URLInputStream.cpp.

References InputStream::Close(), and InputStream::IsOpen().


Member Function Documentation

void URLInputStream::Close (  )  [virtual]

Closes the stream if it is not already closed. All system resources used by the stream are released.

Implements InputStream.

Definition at line 52 of file URLInputStream.cpp.

References InputStream::Close().

std::string URLInputStream::GetLocation (  )  const [virtual]

Returns:
An identifier for the source of this input stream.

Implements InputStream.

Definition at line 68 of file URLInputStream.cpp.

References InputStream::GetLocation().

bool URLInputStream::IsDone (  )  const [virtual]

Returns:
true if the end of the stream has been reached, and false if there are still more bytes to be read.

Implements InputStream.

Definition at line 63 of file URLInputStream.cpp.

References InputStream::IsDone().

Referenced by HTMLTokenizer::HTMLTokenizer().

bool URLInputStream::IsOpen (  )  const [virtual]

Returns:
true if the stream is open, and false if it is closed.

Implements InputStream.

Definition at line 58 of file URLInputStream.cpp.

References InputStream::IsOpen().

Referenced by HTMLTokenizer::HTMLTokenizer().

char URLInputStream::Peek (  )  [virtual]

Returns:
The next byte of data from the document without advancing the stream. throws IllegalStateException - If the stream is closed throws IllegalStateException - If the last byte has already been read from the stream throws FileException, NetworkException, IllegalStateException - Implementation Specific

Implements InputStream.

Definition at line 42 of file URLInputStream.cpp.

References InputStream::Peek().

char URLInputStream::Read (  )  [virtual]

Returns:
The next byte of data from the document. throws IllegalStateException - If the stream is closed throws IllegalStateException - If the last byte has already been read from the stream throws FileException, NetworkException, IllegalStateException - Implementation Specific

Implements InputStream.

Definition at line 47 of file URLInputStream.cpp.

References InputStream::Read().

Referenced by HTMLTokenizer::HTMLTokenizer().


The documentation for this class was generated from the following files:

Generated on Wed Jul 7 16:30:30 2010 for CS240Utils by  doxygen 1.5.8