InputStream Class Reference
[IO: Local and Remote]

#include <InputStream.h>

Inheritance diagram for InputStream:

Inheritance graph
[legend]

List of all members.

Public Member Functions

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


Detailed Description

InputStream is an abstract interface for reading data from a stream.
Examples:

printer.cpp.

Definition at line 43 of file InputStream.h.


Constructor & Destructor Documentation

virtual InputStream::~InputStream (  )  [inline, virtual]

Definition at line 45 of file InputStream.h.


Member Function Documentation

virtual void InputStream::Close (  )  [pure virtual]

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

Implemented in FileInputStream, HTTPInputStream, and URLInputStream.

Referenced by URLInputStream::Close(), and URLInputStream::~URLInputStream().

virtual std::string InputStream::GetLocation (  )  const [pure virtual]

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

Implemented in FileInputStream, HTTPInputStream, and URLInputStream.

Referenced by URLInputStream::GetLocation().

virtual bool InputStream::IsDone (  )  const [pure virtual]

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

Implemented in FileInputStream, HTTPInputStream, and URLInputStream.

Examples:
printer.cpp.

Referenced by URLInputStream::IsDone().

virtual bool InputStream::IsOpen (  )  const [pure virtual]

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

Implemented in FileInputStream, HTTPInputStream, and URLInputStream.

Referenced by URLInputStream::IsOpen(), and URLInputStream::~URLInputStream().

virtual char InputStream::Peek (  )  [pure 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

Implemented in FileInputStream, HTTPInputStream, and URLInputStream.

Referenced by URLInputStream::Peek().

virtual char InputStream::Read (  )  [pure virtual]

Returns:
The next byte of data from the document and advances 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

Implemented in FileInputStream, HTTPInputStream, and URLInputStream.

Examples:
printer.cpp.

Referenced by URLInputStream::Read().


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

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