• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading from File  RSS feed

 
Aabha Varma
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using random file to write some data delimeted by '$' sign.
There is a function which reads the data from file.

but at time when it reads, it takes some strings which are not there in the file.
why is this happening? Is it because there is a limit to the number of characters that can be read.

At times i am also getting StreamReaderCorrupted Exception.
Can anybody explain what are possible reasons this could arise
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This isn't about GUI's so I am moving this to the IO and Streams forum.
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given that there's no such thing as a StreamReaderCorrupted Exception, you didn't share any input, output, expected output or code with us, we're kind of in the dark at this end. You should have a gander at How To Ask Questions on Javaranch. The better question you ask, the more helpful we can be.
What may be happening is that you are trying to read binary data with a Reader, which is intended to read character data. There's a difference.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!