<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - File, Streams and Stores - Comments</title>
 <link>http://www.newlc.com/topic-8648</link>
 <description>Comments for &quot;File, Streams and Stores&quot;</description>
 <language>en</language>
<item>
 <title> Re: File, Streams and Stores.URGENT!!!</title>
 <link>http://www.newlc.com/topic-8648#comment-49465</link>
 <description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;Can anyone guide me to write a function to store persistent data from my application using CPermanentFileStore?&lt;/p&gt;

&lt;p&gt;Or is there any other way to &quot;write byte array chunk of size in bytes to persistent store&quot;?&lt;/p&gt;

&lt;p&gt;Also where is this persistent data stored by CPermanentFileStore?&lt;/p&gt;

&lt;p&gt;Thanx&lt;/p&gt;</description>
 <pubDate>Wed, 19 Nov 2008 14:25:29 +0100</pubDate>
 <dc:creator>diya007</dc:creator>
 <guid isPermaLink="false">comment 49465 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: File, Streams and Stores</title>
 <link>http://www.newlc.com/topic-8648#comment-48842</link>
 <description>&lt;p&gt;really  thats very helpful to beginners like me.&lt;br /&gt;
cheers to eric ...&lt;/p&gt;

&lt;p&gt;thanks a lot&lt;/p&gt;</description>
 <pubDate>Wed, 01 Oct 2008 06:48:49 +0200</pubDate>
 <dc:creator>pointer_raj</dc:creator>
 <guid isPermaLink="false">comment 48842 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: File, Streams and Stores</title>
 <link>http://www.newlc.com/topic-8648#comment-44549</link>
 <description>&lt;p&gt; &lt;img src=&quot;/sites/all/modules/smileys/packs/example/lol.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; /&gt;  It&#039;s very helpful, thx &lt;img src=&quot;/sites/all/modules/smileys/packs/example/lol.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; /&gt; &lt;/p&gt;</description>
 <pubDate>Thu, 14 Feb 2008 08:08:41 +0100</pubDate>
 <dc:creator>3AZZK</dc:creator>
 <guid isPermaLink="false">comment 44549 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: File, Streams and Stores</title>
 <link>http://www.newlc.com/topic-8648#comment-43317</link>
 <description>&lt;p&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;good.... thanks! &lt;/span&gt;&lt;img src=&quot;/sites/all/modules/smileys/packs/example/wink.png&quot; title=&quot;Eye-wink&quot; alt=&quot;Eye-wink&quot; /&gt; &lt;/p&gt;</description>
 <pubDate>Wed, 05 Dec 2007 09:36:32 +0100</pubDate>
 <dc:creator>dlingt</dc:creator>
 <guid isPermaLink="false">comment 43317 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: File, Streams and Stores</title>
 <link>http://www.newlc.com/topic-8648#comment-40931</link>
 <description>&lt;p&gt;fOLLOWING CODE WORKS FOR STORING AND RETRIEVING InetAddr INTO Stream&lt;/p&gt;

&lt;p&gt;                        InetAddr  iIpAddress;&lt;br /&gt;
                        TBuf&lt;30&gt; bufTime;&lt;br /&gt;
   FOR WRITING TO STREAM&lt;br /&gt;
  -----------------------------------------&lt;br /&gt;
                                           &lt;br /&gt;
                                           iIpAddress.Output(bufTime);&lt;br /&gt;
		aStream&lt;&lt;bufTime;&lt;/p&gt;

&lt;p&gt;FOR READING FROM STREAM&lt;br /&gt;
-------------------------------------------&lt;br /&gt;
                                           aStream&gt;&gt;bufTime;&lt;br /&gt;
		iIpAddress.Input(bufTime);&lt;/p&gt;

&lt;p&gt; BUT I DID NOT GET SOLN AS FOR       TTime and TTimeIntervalSeconds Objects????????&lt;br /&gt;
  &lt;/p&gt;

&lt;p&gt;   CAN ANY ONE THROW ANY LIGHT ON IT!!!!!!!!!!!!!!!!!!!!!!&lt;/p&gt;</description>
 <pubDate>Thu, 23 Aug 2007 08:37:39 +0200</pubDate>
 <dc:creator>sandeepmhptr</dc:creator>
 <guid isPermaLink="false">comment 40931 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: File, Streams and Stores</title>
 <link>http://www.newlc.com/topic-8648#comment-40878</link>
 <description>&lt;p&gt;I found some problem in string and retrieving  &lt;br /&gt;
                     TTime iTime;&lt;br /&gt;
	TTimeIntervalSeconds iTimeOffset;&lt;br /&gt;
	TTime iDate;&lt;br /&gt;
	TInetAddr iIpAddress;&lt;/p&gt;

&lt;p&gt;            objects into stream.&lt;/p&gt;

&lt;p&gt;Can anyone tell how to write these objects into stream????????&lt;/p&gt;

&lt;p&gt;also TInt objects are not written into Stream -------------------  &lt;/p&gt;

&lt;p&gt;    RWriteStream&amp; aStream;&lt;br /&gt;
    TInt iColor;&lt;br /&gt;
    aStream&lt;&lt;iColor&lt;/p&gt;

&lt;p&gt;and I had to use&lt;br /&gt;
    RWriteStream&amp; aStream;&lt;br /&gt;
    TInt iColor;&lt;br /&gt;
    aStream.WriteInt32L(iColor);&lt;br /&gt;
                               &lt;/p&gt;</description>
 <pubDate>Wed, 22 Aug 2007 07:52:59 +0200</pubDate>
 <dc:creator>sandeepmhptr</dc:creator>
 <guid isPermaLink="false">comment 40878 at http://www.newlc.com</guid>
</item>
<item>
 <title>how to read and display .html file</title>
 <link>http://www.newlc.com/topic-8648#comment-40705</link>
 <description>&lt;p&gt;am trying to read and display the html file.the below code i have used inside the draw function of view class&lt;br /&gt;
	                                         RFs fs;&lt;br /&gt;
			fs.Connect();&lt;br /&gt;
			RFile file;&lt;br /&gt;
			_LIT(KFileName,&quot;z:\\system\\apps\\sampleprog\\test.html&quot;);&lt;br /&gt;
			file.Open(fs, KFileName, EFileRead);&lt;br /&gt;
			TFileText fileText;&lt;br /&gt;
			fileText.Set(file);&lt;/p&gt;

&lt;p&gt;			TBuf&lt;256&gt; lineText;&lt;br /&gt;
			while(fileText.Read(lineText) != KErrEof)&lt;br /&gt;
			{&lt;br /&gt;
			CWindowGc&amp; gc = SystemGc();&lt;br /&gt;
    		                     TRect rect( Rect());&lt;/p&gt;

&lt;p&gt;                           		if (lineText.Length() &gt; 0)&lt;br /&gt;
        	                                           {&lt;br /&gt;
                                                	gc.DrawText(lineText, rect, Rect().Height(), CGraphicsContext::ELeft );&lt;br /&gt;
                                                	 }&lt;br /&gt;
    		                   else&lt;br /&gt;
        	                                        {&lt;br /&gt;
        	                                        gc.Clear( rect );&lt;br /&gt;
        	                                         }&lt;br /&gt;
			&lt;br /&gt;
			file.Close();&lt;br /&gt;
			fs.Close();&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
 am not getting the output.can any one guide me where iam wrong .&lt;/p&gt;</description>
 <pubDate>Tue, 14 Aug 2007 15:02:51 +0200</pubDate>
 <dc:creator>santhosh.ram</dc:creator>
 <guid isPermaLink="false">comment 40705 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: File, Streams and Stores</title>
 <link>http://www.newlc.com/topic-8648#comment-21519</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote from: arunjith&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;hi&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_LIT(KFileName1,&amp;quot;D:\\AUTOPRINT.MRK&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;RFileWriter *fileWriter = new (ELeave)RFileWriter(); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;Initialize();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// doing fileSession.connect&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;ReplaceFile(KFileName1,EFileWrite); // Opening the file in replace mode&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;InitializeStream();&amp;nbsp;&amp;nbsp;&amp;nbsp;// Initializing the write stream or creating the RFileWriteStream from the opened file using RFILE&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;iHeader-&amp;gt;WriteToFile(fileWriter);&amp;nbsp;&amp;nbsp;&amp;nbsp;//writing the data to file using write stream&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;iJobList-&amp;gt;WriteToFile(fileWriter);&amp;nbsp;&amp;nbsp;&amp;nbsp;//writing the data to file using write stream&lt;br /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;CommitL();Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  //Commiting the streM;&lt;br /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;CloseStream();&amp;nbsp;&amp;nbsp;&amp;nbsp;Â  Â  Â  &amp;nbsp;&amp;nbsp;&amp;nbsp;//closing the stream&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;Close();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;CloseSession();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;delete fileWriter;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;in this code when im trying to close the stream it gives KERN EXEC 0 . and at the asme time if i try to commitL that also ends in panic KERN EXEC 0&lt;br /&gt;if i comment out those 2 lines it works fine . But im supposed 2 close the stream rt&lt;br /&gt;&lt;br /&gt;what cud be the problem? &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;First of all which is this RFileWriter class? And why are you creating the pointer of an RCalss?&lt;br /&gt;&lt;br /&gt;More over here I&amp;#039;ve posted &lt;a href=&quot;http&amp;#58;//forum.newlc.com/index.php/topic,15297.msg45622.html#msg45622&quot; target=&quot;_blank&quot;&gt;how to use an RClass&lt;/a&gt;.&lt;/div&gt;</description>
 <pubDate>Wed, 13 Sep 2006 10:04:58 +0200</pubDate>
 <dc:creator>vin2ktalks</dc:creator>
 <guid isPermaLink="false">comment 21519 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: File, Streams and Stores</title>
 <link>http://www.newlc.com/topic-8648#comment-21518</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;hi&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_LIT(KFileName1,&amp;quot;D:\\AUTOPRINT.MRK&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;RFileWriter *fileWriter = new (ELeave)RFileWriter(); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;Initialize();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// doing fileSession.connect&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;ReplaceFile(KFileName1,EFileWrite); // Opening the file in replace mode&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;InitializeStream();&amp;nbsp;&amp;nbsp;&amp;nbsp;// Initializing the write stream or creating the RFileWriteStream from the opened file using RFILE&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;iHeader-&amp;gt;WriteToFile(fileWriter);&amp;nbsp;&amp;nbsp;&amp;nbsp;//writing the data to file using write stream&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;iJobList-&amp;gt;WriteToFile(fileWriter);&amp;nbsp;&amp;nbsp;&amp;nbsp;//writing the data to file using write stream&lt;br /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;CommitL();&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Commiting the streM;&lt;br /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;CloseStream();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;//closing the stream&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;Close();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileWriter-&amp;gt;CloseSession();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;delete fileWriter;&lt;br /&gt;&lt;br /&gt; in this code when im trying to close the stream it gives KERN EXEC 0 . and at the asme time if i try to commitL that also ends in panic KERN EXEC 0&lt;br /&gt;if i comment out those 2 lines it works fine . But im supposed 2 close the stream rt&lt;br /&gt;&lt;br /&gt;what cud be the problem? &lt;/div&gt;</description>
 <pubDate>Wed, 13 Sep 2006 09:03:03 +0200</pubDate>
 <dc:creator>arunjith</dc:creator>
 <guid isPermaLink="false">comment 21518 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: File, Streams and Stores</title>
 <link>http://www.newlc.com/topic-8648#comment-21517</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hi, I am currenly using Rfile to read a file which is created in the desktop and put in the phone. I use Rfile to read the content of the file. Can i jump to store . stream for reading a file or stick with the RFile itself.&lt;br /&gt;&lt;br /&gt;Guid me&lt;/div&gt;</description>
 <pubDate>Thu, 31 Aug 2006 10:46:05 +0200</pubDate>
 <dc:creator>selva_rajk</dc:creator>
 <guid isPermaLink="false">comment 21517 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: File, Streams and Stores</title>
 <link>http://www.newlc.com/topic-8648#comment-21516</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;A good example for study about write and read from file&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http&amp;#58;//kerncomputing.blogspot.com/2005/02/symbian-os-using-rfile-to-read-and.html&quot; target=&quot;_blank&quot;&gt;http://kerncomputing.blogspot.com/2005/02/symbian-os-using-rfile-to-read-and.html&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 14 Jun 2006 04:22:52 +0200</pubDate>
 <dc:creator>thephongisb</dc:creator>
 <guid isPermaLink="false">comment 21516 at http://www.newlc.com</guid>
</item>
<item>
 <title>Stores - CRichText::ExternalizeL(...) does not work</title>
 <link>http://www.newlc.com/topic-8648#comment-21515</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;I would like only to add here one thing concerning stores with which i had problems:&lt;br /&gt;&lt;br /&gt;CRichText::ExternalizeL(...)&amp;nbsp; does not work !!!&lt;br /&gt;&lt;br /&gt;i found lots of posts from people that had problems with this ... and nobody made it work correctly (all the time it throws some undocumented panic which i was not able to find in symbian include headers)&lt;br /&gt;&lt;br /&gt;create a new store instead and to save datam fro rich text use&lt;br /&gt;&lt;br /&gt;CRichText::StoreL(...)&lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Mon, 17 Apr 2006 10:15:08 +0200</pubDate>
 <dc:creator>adamhusar</dc:creator>
 <guid isPermaLink="false">comment 21515 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: File, Streams and Stores</title>
 <link>http://www.newlc.com/topic-8648#comment-21514</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&amp;gt;&amp;gt; I have just replacedÂ  CleanupStackPushL &amp;amp; PopandDestroy statement by a file.close statement at the end ?&lt;br /&gt;&lt;br /&gt;But why? What are you hoping to achieve? &lt;br /&gt;If you don&amp;#039;t call CleanupClosePushL() and HBufC8::NewLC() leaves then what happens to your file handle?&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 09 Mar 2006 22:12:01 +0100</pubDate>
 <dc:creator>NumptyAlert</dc:creator>
 <guid isPermaLink="false">comment 21514 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: File, Streams and Stores</title>
 <link>http://www.newlc.com/topic-8648#comment-21513</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;span style=&quot;color: Red;&quot;&gt; /* Txt file to be opened. */&lt;br /&gt;&amp;nbsp; &amp;nbsp;RFile file ;&lt;br /&gt;&amp;nbsp; &amp;nbsp;file.Open(aFs, aFilename,EFileRead) ;&lt;br /&gt;////////////&amp;nbsp; &amp;nbsp;CleanupClosePushL(file);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;/* Size of file. */&lt;br /&gt;&amp;nbsp; &amp;nbsp;TInt iSize ;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;file.Size(iSize) ;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;/* Allocate enough memory to read in the whole file. */&lt;br /&gt;&amp;nbsp; &amp;nbsp;HBufC8* buf = HBufC8::NewL(iSize) ;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;/* Get a pointer to modify contents of buffer. */&lt;br /&gt;&amp;nbsp; &amp;nbsp;TPtr8&amp;nbsp; pBuf = buf-&amp;gt;Des() ;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;/* Read data into buf. */&lt;br /&gt;&amp;nbsp; &amp;nbsp;file.Read(pBuf) ;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;////////////CleanupStack::PopAndDestroy( //; // file&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;file.close(); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ls the above&amp;nbsp; program correct? I have just replaced&amp;nbsp; CleanupStackPushL &amp;amp; PopandDestroy statement by a file.close statement at the end ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 09 Mar 2006 11:58:10 +0100</pubDate>
 <dc:creator>neerajgupta</dc:creator>
 <guid isPermaLink="false">comment 21513 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: File, Streams and Stores</title>
 <link>http://www.newlc.com/topic-8648#comment-21512</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;that is just typo while posting not in actual code.well thanks for reply&lt;/div&gt;</description>
 <pubDate>Wed, 01 Mar 2006 05:51:24 +0100</pubDate>
 <dc:creator>vikas_bansal</dc:creator>
 <guid isPermaLink="false">comment 21512 at http://www.newlc.com</guid>
</item>
<item>
 <title>File, Streams and Stores</title>
 <link>http://www.newlc.com/topic-8648</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/topic-8648&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/topic-8648#comments</comments>
 <category domain="http://www.newlc.com/forums/symbian-c">Symbian C++</category>
 <pubDate>Fri, 24 Jun 2005 09:43:54 +0200</pubDate>
 <dc:creator>eric</dc:creator>
 <guid isPermaLink="false">9179 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
