Main Page Class Hierarchy Compound List Compound Members InputStream Class Reference
A stream object which will be used by a Message object for reading, i.e. for de-serializing. More...
Public Methods
virtual void read (short &x) throw (SoamException) read a short from the input stream. virtual void read (unsigned short &x) throw (SoamException) read an unsigned short from the input stream. virtual void read (int &x) throw (SoamException) read an int from the input stream. virtual void read (unsigned int &x) throw (SoamException) read an unsigned int from the input stream. virtual void read (long &x) throw (SoamException) read a long from the input stream. virtual void read (unsigned long &x) throw (SoamException) read an unsigned long from the input stream. virtual void read (long long &x) throw (SoamException) read a long long (64-bit long value) from the input stream. NOTE : For Microsoft Visual C++ compilers earlier than version 7.0 the "__int64" type must be used explicitly. virtual void read (unsigned long long &x) throw (SoamException) read an unsigned long long (64-bit unsigned long value) from the input stream. NOTE : For Microsoft Visual C++ compilers earlier than version 7.0 the "unsigned __int64" type must be used explicitly. virtual void read (float &x) throw (SoamException) read a float from the input stream. virtual void read (double &x) throw (SoamException) read a double from the input stream. virtual void read (bool &x) throw (SoamException) read a bool from the input stream. virtual void read (char &x) throw (SoamException) read a char from the input stream. virtual void read (char *&x) throw (SoamException) read a string from the input stream. virtual void read (std::string &x) throw (SoamException) read a string from the input stream. virtual void readBytes (void *x, unsigned long length) throw (SoamException) read a blob from the input stream. NOTE : The data being read must be the same size as the data written previously since partial reads are not allowed. An exception will be returned for attempts to read partial data. virtual void readByteArray (char *&x, unsigned long &length) throw (SoamException) read a byte array from the input stream. The byte array will be allocated and returned in this method call. The caller becomes the owner of the memory and must delete it. Friends
class ServiceContainer class Message Detailed Description
A stream object which will be used by a Message object for reading, i.e. for de-serializing.Input Streams involve the fundamental operations to retrieve the following basic types of data:
NOTE: It is always best to access a pointer to this type of object through the appropriate smart pointer type instead of using a raw pointer.
- short
- unsigned short
- int
- unsigned int
- long
- unsigned long
- long long (i.e. 64-bit long value)
- unsigned long long (i.e. 64-bit unsigned long value)
- float
- double
- bool
- char
- char*
- void*
- See also:
- InputStreamPtr , Message
Member Function Documentation
virtual void read ( short & x ) throw (SoamException) [virtual]
read a short from the input stream.
- Parameters:
x [OUT] - returns the read short.
- Exceptions:
SoamException
virtual void read ( unsigned short & x ) throw (SoamException) [virtual]
read an unsigned short from the input stream.
- Parameters:
x [OUT] - returns the read unsigned short.
- Exceptions:
SoamException
virtual void read ( int & x ) throw (SoamException) [virtual]
read an int from the input stream.
- Parameters:
x [OUT] - returns the read integer.
- Exceptions:
SoamException
virtual void read ( unsigned int & x ) throw (SoamException) [virtual]
read an unsigned int from the input stream.
- Parameters:
x [OUT] - returns the read unsigned integer.
- Exceptions:
SoamException
virtual void read ( long & x ) throw (SoamException) [virtual]
read a long from the input stream.
- Parameters:
x [OUT] - returns the read long.
- Exceptions:
SoamException
virtual void read ( unsigned long & x ) throw (SoamException) [virtual]
read an unsigned long from the input stream.
- Parameters:
x [OUT] - returns the read unsigned long.
- Exceptions:
SoamException
virtual void read ( long long & x ) throw (SoamException) [virtual]
read a long long (64-bit long value) from the input stream. NOTE : For Microsoft Visual C++ compilers earlier than version 7.0 the "__int64" type must be used explicitly.
- Parameters:
x [OUT] - returns the read long long.
- Exceptions:
SoamException
virtual void read ( unsigned long long & x ) throw (SoamException) [virtual]
read an unsigned long long (64-bit unsigned long value) from the input stream. NOTE : For Microsoft Visual C++ compilers earlier than version 7.0 the "unsigned __int64" type must be used explicitly.
- Parameters:
x [OUT] - returns the read unsigned long long.
- Exceptions:
SoamException
virtual void read ( float & x ) throw (SoamException) [virtual]
read a float from the input stream.
- Parameters:
x [OUT] - returns the read float.
- Exceptions:
SoamException
virtual void read ( double & x ) throw (SoamException) [virtual]
read a double from the input stream.
- Parameters:
x [OUT] - returns the read double.
- Exceptions:
SoamException
virtual void read ( bool & x ) throw (SoamException) [virtual]
read a bool from the input stream.
- Parameters:
x [OUT] - returns the read bool.
- Exceptions:
SoamException
virtual void read ( char & x ) throw (SoamException) [virtual]
read a char from the input stream.
- Parameters:
x [OUT] - returns the read char.
- Exceptions:
SoamException
virtual void read ( char *& x ) throw (SoamException) [virtual]
read a string from the input stream.
NOTE: The developer is responsible for the management of the string returned from this read operation. The string must be freed using the "delete" operator when it is no longer required.
for example ;
char* myString;
inputStream->read(myString); // now we own the memory
...
...
...
// now we must free it when we no longer need it
delete []myString;
myString = 0;
- Parameters:
x [OUT] - returns the read string.
- Exceptions:
SoamException
virtual void read ( std::string & x ) throw (SoamException) [virtual]
read a string from the input stream.
- Parameters:
x [OUT] - returns the read string.
- Exceptions:
SoamException
virtual void readBytes ( void * x, unsigned long length ) throw (SoamException) [virtual]
read a blob from the input stream. NOTE : The data being read must be the same size as the data written previously since partial reads are not allowed. An exception will be returned for attempts to read partial data.
- Parameters:
x [OUT] - returns the read blob. length [IN] - The maximum amount of bytes that can be read from the stream into the buffer.
- Exceptions:
SoamException
virtual void readByteArray ( char *& x, unsigned long & length ) throw (SoamException) [virtual]
read a byte array from the input stream. The byte array will be allocated and returned in this method call. The caller becomes the owner of the memory and must delete it.
- Parameters:
x [OUT] - returns the read byte array. length [OUT] - returns the length of the read byte array
- Exceptions:
SoamException
Date Modified: 3 Nov 2008
Platform Support: support@platform.com
Platform Information Development: doc@platform.com
Platform Computing. Accelerating Intelligence(TM).
Copyright © 2001-2008 Platform Computing Corporation. All rights reserved.