Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

HttpReader Class Reference

Inheritance diagram for HttpReader:

Reader List of all members.

Public Member Functions

 this (IBuffer buffer)
void getPostData (byte[] dst)

Private Member Functions

 this (IConduit conduit)
IBuffer getBuffer ()
IArrayAllocator getAllocator ()
void setAllocator (IArrayAllocator memory)
void setDecoder (IDecoder d)
void wait ()
uint read (void *dst, uint bytes, uint type)
IReader get (IReadable x)
IReader get (inout bool x)
IReader get (inout ubyte x)
IReader get (inout byte x)
IReader get (inout ushort x)
IReader get (inout short x)
IReader get (inout uint x)
IReader get (inout int x)
IReader get (inout ulong x)
IReader get (inout long x)
IReader get (inout float x)
IReader get (inout double x)
IReader get (inout real x)
IReader get (inout char x)
IReader get (inout wchar x)
IReader get (inout dchar x)
IReader get (inout ubyte[] x, uint elements=uint.max)
IReader get (inout byte[] x, uint elements=uint.max)
IReader get (inout ushort[] x, uint elements=uint.max)
IReader get (inout short[] x, uint elements=uint.max)
IReader get (inout uint[] x, uint elements=uint.max)
IReader get (inout int[] x, uint elements=uint.max)
IReader get (inout ulong[] x, uint elements=uint.max)
IReader get (inout long[] x, uint elements=uint.max)
IReader get (inout float[] x, uint elements=uint.max)
IReader get (inout double[] x, uint elements=uint.max)
IReader get (inout real[] x, uint elements=uint.max)
IReader get (inout char[] x, uint elements=uint.max)
IReader get (inout wchar[] x, uint elements=uint.max)
IReader get (inout dchar[] x, uint elements=uint.max)

Private Attributes

IBuffer buffer
Decoder decode

Detailed Description

There's no real need at this time to provide an http-specific reader. This is just for future growth.

Definition at line 54 of file HttpReader.d.


Member Function Documentation

this IBuffer  buffer  )  [inline]
 

Construct a Reader upon the provided buffer

Reimplemented from Reader.

Definition at line 60 of file HttpReader.d.

void getPostData byte[]  dst  )  [inline]
 

Temporary patch for reading POST data from an input stream.

Todo:
this needs to be replaced when the ArrayReaders are supported

Definition at line 74 of file HttpReader.d.

References Reader::read().

Referenced by testServletEngine().

this IConduit  conduit  )  [inline, inherited]
 

Construct a Reader upon the buffer associated with the given conduit.

Definition at line 182 of file Reader.d.

IBuffer getBuffer  )  [inline, inherited]
 

Return the buffer associated with this reader

Reimplemented from IReader.

Definition at line 193 of file Reader.d.

References Reader::buffer.

IArrayAllocator getAllocator  )  [inline, inherited]
 

Return the allocator associated with this reader. See ArrayAllocator for more information.

Reimplemented from IReader.

Definition at line 205 of file Reader.d.

References Reader::memory.

void setAllocator IArrayAllocator  memory  )  [inline, inherited]
 

Set the allocator to use for array management. Arrays are always allocated by the IReader. That is, you cannot read data into an array slice (for example). Instead, a number of IArrayAllocator classes are available to manage memory allocation when reading array content.

By default, an IReader will allocate each array from the heap. You can change that behavior by calling this method with an IArrayAllocator of choice. For instance, there is a BufferAllocator which will slice an array directly from the buffer where possible. Also available is the record-oriented SliceAllocator, which slices memory from within a pre-allocated heap area, and should be reset by the client code after each record has been read (to avoid unnecessary growth).

See ArrayAllocator for more information.

Reimplemented from IReader.

Definition at line 232 of file Reader.d.

References IArrayAllocator::bind().

Referenced by Reader::this().

void setDecoder IDecoder  d  )  [inline, inherited]
 

Bind an IDecoder to the writer. Decoders are intended to be used as a conversion mechanism between various character representations (encodings), or the translation of any data type from one representation to another. Each data type may be configured with a distinct decoder, covering all native types (15 in total).

An appropriate decoder set should be attached to each IReader, and thus be available for subsequent use. A raw binary implementation is attached by default (no encoding).

See module mango.icu.UMango for an example of decoder implementation -- those classes bind the ICU converters to this IO package.

Reimplemented from IReader.

Definition at line 257 of file Reader.d.

References IDecoder::bind(), Reader::decode, Reader::Decoder::decoders, and IDecoder::type().

void wait  )  [inline, inherited]
 

Wait for something to arrive in the buffer. This may stall the current thread forever, although usage of SocketConduit will take advantage of the timeout facilities provided there.

Reimplemented from IReader.

Definition at line 284 of file Reader.d.

References Reader::buffer, and IBuffer::get().

uint read void *  dst,
uint  bytes,
uint  type
[inline, inherited]
 

Reimplemented in EndianReader, and TextReader.

Definition at line 293 of file Reader.d.

References Reader::buffer, IBuffer::get(), and IBuffer::readable().

Referenced by Reader::get(), getPostData(), testConduitFilters(), and Reader::this().

IReader get IReadable  x  )  [inline, inherited]
 

Extract a readable class from the current read-position

Reimplemented from IReader.

Definition at line 325 of file Reader.d.

References assert(), and IReadable::read().

Referenced by Reader::count(), and testBuffer().

IReader get inout bool  x  )  [inline, inherited]
 

Extract a boolean value from the current read-position

Reimplemented from IReader.

Definition at line 338 of file Reader.d.

References Reader::read().

IReader get inout ubyte  x  )  [inline, inherited]
 

Extract an unsigned byte value from the current read-position

Reimplemented from IReader.

Definition at line 350 of file Reader.d.

References Reader::read().

IReader get inout byte  x  )  [inline, inherited]
 

Extract a byte value from the current read-position

Reimplemented from IReader.

Definition at line 362 of file Reader.d.

References Reader::read().

IReader get inout ushort  x  )  [inline, inherited]
 

Extract an unsigned short value from the current read-position

Reimplemented from IReader.

Definition at line 374 of file Reader.d.

References Reader::read().

IReader get inout short  x  )  [inline, inherited]
 

Extract a short value from the current read-position

Reimplemented from IReader.

Definition at line 386 of file Reader.d.

References Reader::read().

IReader get inout uint  x  )  [inline, inherited]
 

Extract a unsigned int value from the current read-position

Reimplemented from IReader.

Definition at line 398 of file Reader.d.

References Reader::read().

IReader get inout int  x  )  [inline, inherited]
 

Extract an int value from the current read-position

Reimplemented from IReader.

Definition at line 410 of file Reader.d.

References Reader::read().

IReader get inout ulong  x  )  [inline, inherited]
 

Extract an unsigned long value from the current read-position

Reimplemented from IReader.

Definition at line 422 of file Reader.d.

References Reader::read().

IReader get inout long  x  )  [inline, inherited]
 

Extract a long value from the current read-position

Reimplemented from IReader.

Definition at line 434 of file Reader.d.

References Reader::read().

IReader get inout float  x  )  [inline, inherited]
 

Extract a float value from the current read-position

Reimplemented from IReader.

Definition at line 446 of file Reader.d.

References Reader::read().

IReader get inout double  x  )  [inline, inherited]
 

Extract a double value from the current read-position

Reimplemented from IReader.

Definition at line 458 of file Reader.d.

References Reader::read().

IReader get inout real  x  )  [inline, inherited]
 

Extract a real value from the current read-position

Reimplemented from IReader.

Definition at line 470 of file Reader.d.

References Reader::read().

IReader get inout char  x  )  [inline, inherited]
 

Extract a char value from the current read-position

Reimplemented from IReader.

Definition at line 482 of file Reader.d.

References Reader::Decoder::char8, and Reader::decode.

IReader get inout wchar  x  )  [inline, inherited]
 

Extract a wide char value from the current read-position

Reimplemented from IReader.

Definition at line 494 of file Reader.d.

References Reader::Decoder::char16, and Reader::decode.

IReader get inout dchar  x  )  [inline, inherited]
 

Extract a double char value from the current read-position

Reimplemented from IReader.

Definition at line 506 of file Reader.d.

References Reader::Decoder::char32, and Reader::decode.

IReader get inout ubyte[]  x,
uint  elements = uint.max
[inline, inherited]
 

Extract an unsigned byte array from the current read-position

Reimplemented from IReader.

Definition at line 518 of file Reader.d.

References IArrayAllocator::allocate(), Reader::count(), Reader::memory, and Reader::read().

IReader get inout byte[]  x,
uint  elements = uint.max
[inline, inherited]
 

Extract a byte array from the current read-position

Reimplemented from IReader.

Definition at line 531 of file Reader.d.

References IArrayAllocator::allocate(), Reader::count(), Reader::memory, and Reader::read().

IReader get inout ushort[]  x,
uint  elements = uint.max
[inline, inherited]
 

Extract an unsigned short array from the current read-position

Reimplemented from IReader.

Definition at line 544 of file Reader.d.

References IArrayAllocator::allocate(), Reader::count(), Reader::memory, and Reader::read().

IReader get inout short[]  x,
uint  elements = uint.max
[inline, inherited]
 

Extract a short array from the current read-position

Reimplemented from IReader.

Definition at line 557 of file Reader.d.

References IArrayAllocator::allocate(), Reader::count(), Reader::memory, and Reader::read().

IReader get inout uint[]  x,
uint  elements = uint.max
[inline, inherited]
 

Extract a unsigned int array from the current read-position

Reimplemented from IReader.

Definition at line 570 of file Reader.d.

References IArrayAllocator::allocate(), Reader::count(), Reader::memory, and Reader::read().

IReader get inout int[]  x,
uint  elements = uint.max
[inline, inherited]
 

Extract an int array from the current read-position

Reimplemented from IReader.

Definition at line 583 of file Reader.d.

References IArrayAllocator::allocate(), Reader::count(), Reader::memory, and Reader::read().

IReader get inout ulong[]  x,
uint  elements = uint.max
[inline, inherited]
 

Extract an unsigned long array from the current read-position

Reimplemented from IReader.

Definition at line 596 of file Reader.d.

References IArrayAllocator::allocate(), Reader::count(), Reader::memory, and Reader::read().

IReader get inout long[]  x,
uint  elements = uint.max
[inline, inherited]
 

Extract a long array from the current read-position

Reimplemented from IReader.

Definition at line 609 of file Reader.d.

References IArrayAllocator::allocate(), Reader::count(), Reader::memory, and Reader::read().

IReader get inout float[]  x,
uint  elements = uint.max
[inline, inherited]
 

Extract a float array from the current read-position

Reimplemented from IReader.

Definition at line 622 of file Reader.d.

References IArrayAllocator::allocate(), Reader::count(), Reader::memory, and Reader::read().

IReader get inout double[]  x,
uint  elements = uint.max
[inline, inherited]
 

Extract a double array from the current read-position

Reimplemented from IReader.

Definition at line 635 of file Reader.d.

References IArrayAllocator::allocate(), Reader::count(), Reader::memory, and Reader::read().

IReader get inout real[]  x,
uint  elements = uint.max
[inline, inherited]
 

Extract a real array from the current read-position

Reimplemented from IReader.

Definition at line 648 of file Reader.d.

References IArrayAllocator::allocate(), Reader::count(), Reader::memory, and Reader::read().

IReader get inout char[]  x,
uint  elements = uint.max
[inline, inherited]
 

Reimplemented from IReader.

Reimplemented in TextReader.

Definition at line 659 of file Reader.d.

References IArrayAllocator::allocate(), Reader::Decoder::char8, Reader::count(), Reader::decode, and Reader::memory.

IReader get inout wchar[]  x,
uint  elements = uint.max
[inline, inherited]
 

Reimplemented from IReader.

Reimplemented in TextReader.

Definition at line 670 of file Reader.d.

References IArrayAllocator::allocate(), Reader::Decoder::char16, Reader::count(), Reader::decode, and Reader::memory.

IReader get inout dchar[]  x,
uint  elements = uint.max
[inline, inherited]
 

Reimplemented from IReader.

Reimplemented in TextReader.

Definition at line 681 of file Reader.d.

References IArrayAllocator::allocate(), Reader::Decoder::char32, Reader::count(), Reader::decode, and Reader::memory.


Member Data Documentation

IBuffer buffer [protected, inherited]
 

Definition at line 150 of file Reader.d.

Referenced by Reader::getBuffer(), Reader::read(), Reader::this(), and Reader::wait().

Decoder decode [protected, inherited]
 

Definition at line 153 of file Reader.d.

Referenced by Reader::get(), Reader::setDecoder(), and Reader::this().


The documentation for this class was generated from the following file:
Generated on Fri May 27 18:12:01 2005 for Mango by  doxygen 1.4.0