You Are Here:

Community: Developer Discussion Boards

#1 Old Bug in DataInputStream or what ? - 2009-03-28, 16:52

Join Date: Sep 2007
Posts: 61
Location: Ukraine
Send a message via ICQ to UGreek Send a message via Skype™ to UGreek
UGreek
Offline
Regular Contributor
I try read data from my binary file:

Code:
iFileConnection = (FileConnection) Connector.open(aPath, Connector.READ);
 iDataInputStream = iFileConnection.openDataInputStream();
//read some data
....

Code:
iDataInputStream.mark(1);
//read some data
....

// try return to mark position
// THIS WORK FINE ON S40 BUT NOT WORK ON S60 (position not change) !!! WHY ???

Code:
iDataInputStream.reset();
I don't understand why that not work on S60 (return to mark position) ?
Please help me.
Reply With Quote

#2 Old Re: Bug in DataInputStream or what ? - 2009-03-28, 18:33

Join Date: Jun 2003
Posts: 4,325
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Online
Forum Nokia Champion
InputStream.mark() and InputStream.reset() are optional. Check the return value from markSupported() to see if the InputStream you're using supports marking.

If markSupported() returns false, then, no, this is not a bug.

Cheers,
Graham.
Reply With Quote

#3 Old Re: Bug in DataInputStream or what ? - 2009-03-28, 19:09

Join Date: Sep 2007
Posts: 61
Location: Ukraine
Send a message via ICQ to UGreek Send a message via Skype™ to UGreek
UGreek
Offline
Regular Contributor
markSupported() return TRUE !!!
Reply With Quote

#4 Old Re: Bug in DataInputStream or what ? - 2009-03-28, 19:38

Join Date: Jun 2003
Posts: 4,325
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Online
Forum Nokia Champion
Quote:
Originally Posted by UGreek View Post
Code:
iDataInputStream.mark(1);
Why "1"? As soon as one byte is read, the marked position may become invalid. Try using a higher value (larger than the number of bytes you want to read past the mark).

Cheers,
Graham.
Reply With Quote

#5 Old Red face Re: Bug in DataInputStream or what ? - 2009-03-28, 19:56

Join Date: Sep 2007
Posts: 61
Location: Ukraine
Send a message via ICQ to UGreek Send a message via Skype™ to UGreek
UGreek
Offline
Regular Contributor
THANK YOU VERY MATCH !!!!!
IT'S WORK !!! :)
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
RecordStore bug on Series 60 ncerezo2 Mobile Java General 20 2008-11-13 05:31
Serious BUG in Nokia phones!!! bartekn Mobile Java Media (Graphics & Sounds) 10 2004-03-28 23:09
A bug: setColor with offscreen graphics - PLEASE, REPLY THIS TIME palmcrust Mobile Java General 11 2003-12-04 13:43
Firmware bug or code bug displaying list on 3650 blackjack75 Mobile Java General 2 2003-09-24 20:52
** Important ** Event bug in phone and emulator. fnagaton General Symbian C++ 8 2003-07-11 13:56

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ