MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Reads only part of file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51175] Re: [mg51163] Reads only part of file
  • From: Sseziwa Mukasa <mukasa at jeol.com>
  • Date: Thu, 7 Oct 2004 05:25:58 -0400 (EDT)
  • References: <200410060835.EAA24296@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On Oct 6, 2004, at 4:35 AM, Steve Gray wrote:

> 	My previous post said that only part of my binary file was reading 
> in. Further investigation
> shows that Mathematica stopped reading when it got to a data byte 
> value of $1A = 26, which is an EOF value.
> 	Help says it will do this but does NOT say how to keep reading the 
> file. Obviously in a
> binary file any value must be readable. I am getting around this for 
> now by changing all the 1A's to
> 1B's with a hex file editor (which does NOT have trouble reading past 
> EOF's), but this is a pretty
> awful solution.
> 	Is there a better way? Thanks for any leads.

If you know the size of your input stream you can test to see if you 
terminated early and use SetStreamPosition to get past the problematic 
characters.  You'll probably have to read it in pieces and then merge 
them all together at the end.

Regards,

Ssezi


  • Prev by Date: RenderMan RI bindings for Mathematica
  • Next by Date: Re: Reads only part of file
  • Previous by thread: Reads only part of file
  • Next by thread: Re: Reads only part of file