# Cinder

# cinder::IStreamUrl Class Reference

`#include <Url.h>`

Inherits cinder::IStream.

List of all members.

## Public Types
enum | Endianness { STREAM_BIG_ENDIAN, STREAM_LITTLE_ENDIAN }
## Public Member Functions
| ~IStreamUrl ()
virtual size_t | readDataAvailable (void *dest, size_t maxSize)
virtual void | seekAbsolute (off_t absoluteOffset)
| Sets the current position of the stream to byte absoluteOffset. A negative offset is relative to the end of the file.
virtual void | seekRelative (off_t relativeOffset)
| Moves the current position of the stream by relativeOffset bytes.
virtual off_t | tell () const
| Returns the current position of the stream measured in bytes **/.
virtual off_t | size () const
virtual bool | isEof () const
std::string | getUser () const
std::string | getPassword () const
long | getResponseCode () const
std::string | getEffectiveUrl () const
template<typename T >
void | read (T *t)
template<typename T >
void | readEndian (T *t, uint8_t endian)
template<typename T >
void | readBig (T *t)
template<typename T >
void | readLittle (T *t)
void | readFixedString (char *t, size_t maxSize, bool nullTerminate)
void | readFixedString (std::string *t, size_t size)
std::string | readLine ()
void | readData (void *dest, size_t size)
const std::string & | getFileName () const
| Returns the file name of the path from which a Stream originated when relevant. Empty string when undefined.
void | setFileName (const std::string &aFileName)
| Sets the file name of the path from which a Stream originated when relevant. Empty string when undefined.
## Static Public Member Functions
static IStreamUrlRef | createRef (const std::string &url, const std::string &user, const std::string &password)
| Creates a new IStreamUrlRef from the memory pointed to by data which is of size size bytes.
static uint8_t | getNativeEndianness ()
## Public Attributes
return | STREAM_BIG_ENDIAN
## Protected Member Functions
| IStreamUrl (const std::string &url, const std::string &user, const std::string &password)
virtual void | IORead (void *t, size_t size)
virtual void | IOWrite (const void *t, size_t size)
int | bufferRemaining () const
void | fillBuffer (int wantBytes) const
## Static Protected Member Functions
static size_t | writeCallback (char *buffer, size_t size, size_t nitems, void *userp)
## Protected Attributes
std::string | mFileName
## Static Protected Attributes
static const int | MINIMUM_BUFFER_SIZE = 8

## Detailed Description

Warning:
  IStreamUrl does not currently support proper random access

## Member Enumeration Documentation

enum cinder::StreamBase::Endianness`[inherited]`

Enumerator:

  STREAM_BIG_ENDIAN |
  STREAM_LITTLE_ENDIAN |

## Constructor & Destructor Documentation

cinder::IStreamUrl::~IStreamUrl | ( |  | ) |

cinder::IStreamUrl::IStreamUrl | ( | const std::string & | url,
|  | const std::string & | user,
|  | const std::string & | password |
| ) |  |  | `[protected]`

## Member Function Documentation

IStreamUrlRef cinder::IStreamUrl::createRef | ( | const std::string & | url,
|  | const std::string & | user,
|  | const std::string & | password |
| ) |  |  | `[static]`

Creates a new IStreamUrlRef from the memory pointed to by data which is of size size bytes.

size_t cinder::IStreamUrl::readDataAvailable | ( | void * | dest,
|  | size_t | maxSize |
| ) |  |  | `[virtual]`

Implements cinder::IStream.

void cinder::IStreamUrl::seekAbsolute | ( | off_t | absoluteOffset | ) | `[virtual]`

Sets the current position of the stream to byte absoluteOffset. A negative offset is relative to the end of the file.

Implements cinder::StreamBase.

void cinder::IStreamUrl::seekRelative | ( | off_t | relativeOffset | ) | `[virtual]`

Moves the current position of the stream by relativeOffset bytes.

Implements cinder::StreamBase.

virtual off_t cinder::IStreamUrl::tell | ( |  | ) | const`[virtual]`

Returns the current position of the stream measured in bytes **/.

Implements cinder::StreamBase.

off_t cinder::IStreamUrl::size | ( |  | ) | const`[virtual]`

Implements cinder::IStream.

bool cinder::IStreamUrl::isEof | ( |  | ) | const`[virtual]`

Implements cinder::IStream.

std::string cinder::IStreamUrl::getUser | ( |  | ) | const

std::string cinder::IStreamUrl::getPassword | ( |  | ) | const

long cinder::IStreamUrl::getResponseCode | ( |  | ) | const

std::string cinder::IStreamUrl::getEffectiveUrl | ( |  | ) | const

void cinder::IStreamUrl::IORead | ( | void * | t,
|  | size_t | size |
| ) |  |  | `[protected, virtual]`

Implements cinder::IStream.

virtual void cinder::IStreamUrl::IOWrite | ( | const void * | t,
|  | size_t | size |
| ) |  |  | `[protected, virtual]`

int cinder::IStreamUrl::bufferRemaining | ( |  | ) | const`[protected]`

void cinder::IStreamUrl::fillBuffer | ( | int | wantBytes | ) | const`[protected]`

size_t cinder::IStreamUrl::writeCallback | ( | char * | buffer,
|  | size_t | size,
|  | size_t | nitems,
|  | void * | userp |
| ) |  |  | `[static, protected]`

template<typename T >

void cinder::IStream::read | ( | T * | t | ) | `[inherited]`

template<typename T >

void cinder::IStream::readEndian | ( | T * | t,
|  | uint8_t | endian |
| ) |  |  | `[inherited]`

template<typename T >

void cinder::IStream::readBig | ( | T * | t | ) | `[inherited]`

template<typename T >

void cinder::IStream::readLittle | ( | T * | t | ) | `[inherited]`

void cinder::IStream::readFixedString | ( | char * | t,
|  | size_t | maxSize,
|  | bool | nullTerminate |
| ) |  |  | `[inherited]`

void cinder::IStream::readFixedString | ( | std::string * | t,
|  | size_t | size |
| ) |  |  | `[inherited]`

std::string cinder::IStream::readLine | ( |  | ) | `[inherited]`

void cinder::IStream::readData | ( | void * | dest,
|  | size_t | size |
| ) |  |  | `[inherited]`

static uint8_t cinder::StreamBase::getNativeEndianness | ( |  | ) | `[static, inherited]`

Returns the platform's endianness as a StreamBase::Endianness

const std::string& cinder::StreamBase::getFileName | ( |  | ) | const`[inherited]`

Returns the file name of the path from which a Stream originated when relevant. Empty string when undefined.

void cinder::StreamBase::setFileName | ( | const std::string & | aFileName | ) | `[inherited]`

Sets the file name of the path from which a Stream originated when relevant. Empty string when undefined.

## Member Data Documentation

const int cinder::IStream::MINIMUM_BUFFER_SIZE = 8`[static, protected, inherited]`

return cinder::StreamBase::STREAM_BIG_ENDIAN`[inherited]`

std::string cinder::StreamBase::mFileName`[protected, inherited]`

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

- include/cinder/Url.h
- src/cinder/Url.cpp