Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > e3918135d52936bad0ecc8654eedea12 > files > 61

Falcon-doc-0.9.6.8-1.fc15.noarch.rpm

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head><meta content="text/html;charset=&amp;quot;utf-8&amp;quot;" http-equiv="Content-type"/><link href="faldoc.css" rel="stylesheet" type="text/css"/><title> - Class StringStream</title></head><body class="faldoc"><ul class="navi_top"><li class="top"><a href="index.html">Top: Table of contents</a></li>
         <li class="up"><a href="core.html">Up: The core module</a></li>
         <li class="prev"><a href="core_Set.html">Previous: Class Set</a></li>
         <li class="next"><a href="core_Table.html">Next: Class Table</a></li>
         <li class="clear"></li>
         </ul><div id="page_body"><h1><span class="toc_number">1.34</span>Class StringStream</h1><p class="brief">Memory based stream. </p>
         <pre class="prototype">Class StringStream( [buffer] ) from \
                 <a href="core_Stream.html">Stream</a>( )</pre>
         <table class="prototype">
         <tbody><tr class="optparam"><td class="name">buffer</td><td class="content"> The buffer that will be used as stream </td></tr>
               </tbody>
            </table>
         <p>The StringStream class inherits from stream. It can be used to provide functions that are supposed to write to streams with a memory buffer; for example, variables may be serialized on a string stream which can be then written completely on a physical stream, or sent over the network, or written in a database blob field. The reverse is of course possible: a string can be read from any source and then used to construct a StringStream, that can be then fed to function expecting streams as parameters. </p>
<p>Of course, all the methods listed in the Stream class are available also here. </p>
<p>The StringStream is always available for read and write operations, and supports seek operations. Writing past the end of the stream will cause the StringStream to grow. </p>
<p>If the parameter <b>buffer</b> is a numeric value, the constructor preallocates the given size. Writes up to buffer size won't require re-allocation, and the size will be used as a hint to grow the stream buffer sensibly. </p>
<p>If a string is provided, it is used as initial contents of the StringStream; subsequent reads will return the data contained in the string. </p>
<table class="members">
         <tbody><tr class="member_type"><td class="member_type" colspan="2">Methods</td></tr>
               <tr><td><a href="#closeToString">closeToString</a></td><td>Close the stream and returns its contents. </td></tr>
               <tr><td><a href="#getString">getString</a></td><td>Returns the data currently stored in the stream. </td></tr>
               </tbody>
            </table>
         <table class="members">
         <tbody><tr class="member_type"><td class="member_type" colspan="2">Properties inherited from class <a href="core_Stream.html">Stream</a></td></tr>
               <tr><td><a href="core_Stream.html#encoding">encoding</a></td><td> Name of the set encoding, if given, for text operations </td></tr>
               <tr><td><a href="core_Stream.html#eolMode">eolMode</a></td><td> Mode of EOL conversion in text operations.</td></tr>
               </tbody>
            <tbody><tr class="member_type"><td class="member_type" colspan="2">Methods inherited from class <a href="core_Stream.html">Stream</a></td></tr>
               <tr><td><a href="core_Stream.html#clone">clone</a></td><td>Clone the stream handle. </td></tr>
               <tr><td><a href="core_Stream.html#close">close</a></td><td>Closes the stream. </td></tr>
               <tr><td><a href="core_Stream.html#eof">eof</a></td><td>Checks if the last read operation hit the end of the file. </td></tr>
               <tr><td><a href="core_Stream.html#errorDescription">errorDescription</a></td><td>Returns a system specific textual description of the last error. </td></tr>
               <tr><td><a href="core_Stream.html#flush">flush</a></td><td>Flushes a stream. </td></tr>
               <tr><td><a href="core_Stream.html#getBuffering">getBuffering</a></td><td>Returns the size of I/O buffering active on this stream. </td></tr>
               <tr><td><a href="core_Stream.html#grab">grab</a></td><td>Grabs binary data from the stream. </td></tr>
               <tr><td><a href="core_Stream.html#grabLine">grabLine</a></td><td>Grabs a line of text encoded data. </td></tr>
               <tr><td><a href="core_Stream.html#grabText">grabText</a></td><td>Grabs text encoded data from the stream. </td></tr>
               <tr><td><a href="core_Stream.html#isOpen">isOpen</a></td><td>Checks if the stream is currently open. </td></tr>
               <tr><td><a href="core_Stream.html#lastError">lastError</a></td><td>Return the last system error. </td></tr>
               <tr><td><a href="core_Stream.html#lastMoved">lastMoved</a></td><td>Return the amount of data moved by the last operation. </td></tr>
               <tr><td><a href="core_Stream.html#read">read</a></td><td>Reads binary data from the stream. </td></tr>
               <tr><td><a href="core_Stream.html#readAvailable">readAvailable</a></td><td>Checks if data can be read, or wait for available data. </td></tr>
               <tr><td><a href="core_Stream.html#readLine">readLine</a></td><td>Reads a line of text encoded data. </td></tr>
               <tr><td><a href="core_Stream.html#readText">readText</a></td><td>Reads text encoded data from the stream. </td></tr>
               <tr><td><a href="core_Stream.html#seek">seek</a></td><td>Moves the file pointer on seekable streams. </td></tr>
               <tr><td><a href="core_Stream.html#seekCur">seekCur</a></td><td>Moves the file pointer on seekable streams relative to current position. </td></tr>
               <tr><td><a href="core_Stream.html#seekEnd">seekEnd</a></td><td>Moves the file pointer on seekable streams relative to end of file. </td></tr>
               <tr><td><a href="core_Stream.html#setBuffering">setBuffering</a></td><td>Set the buffering state of this stream. </td></tr>
               <tr><td><a href="core_Stream.html#setEncoding">setEncoding</a></td><td>Set the text encoding and EOL mode for text-based operations. </td></tr>
               <tr><td><a href="core_Stream.html#tell">tell</a></td><td>Return the current position in a stream. </td></tr>
               <tr><td><a href="core_Stream.html#truncate">truncate</a></td><td>Resizes a file. </td></tr>
               <tr><td><a href="core_Stream.html#write">write</a></td><td>Write binary data to a stream. </td></tr>
               <tr><td><a href="core_Stream.html#writeAvailable">writeAvailable</a></td><td>Checks if data can be written, or wait until it's possible to write. </td></tr>
               <tr><td><a href="core_Stream.html#writeText">writeText</a></td><td>Write text data to a stream. </td></tr>
               </tbody>
            </table>
         <h2>Methods</h2><h3><a name="closeToString">closeToString</a></h3><p class="brief">Close the stream and returns its contents. </p>
         <pre class="prototype">StringStream.closeToString()</pre>
         <table class="prototype">
         <tbody><tr class="return"><td class="name">Return</td><td class="content">The stream contents. </td></tr>
               </tbody>
            </table>
         <p>Closes the stream and returns the contents of the stream as a string. The object is internally destroyed, and the whole content is transformed into the returned string. In this way, an extra allocation and copy can be spared. </p>
<h3><a name="getString">getString</a></h3><p class="brief">Returns the data currently stored in the stream. </p>
         <pre class="prototype">StringStream.getString()</pre>
         <table class="prototype">
         <tbody><tr class="return"><td class="name">Return</td><td class="content">A copy of the contents of this stream. </td></tr>
               </tbody>
            </table>
         <p>The data currently held in the stream is left untouched, and a new copy of the data is returned. </p>
</div><ul class="navi_bottom"><li class="top"><a href="index.html">Top: Table of contents</a></li>
         <li class="up"><a href="core.html">Up: The core module</a></li>
         <li class="prev"><a href="core_Set.html">Previous: Class Set</a></li>
         <li class="next"><a href="core_Table.html">Next: Class Table</a></li>
         <li class="clear"></li>
         </ul><div class="signature">Made with <a href="faldoc 3.0">http://www.falconpl.org</a></div></body></html>