Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: encountering EOF not at the End Of File
Michael Campbell
10/9/2003 5:29:00 PM
Open the file in binary mode, and/or use #binmode.
> -----Original Message-----
> From: Meinrad Recheis [mailto:meinrad.recheis@aon.at]
> Sent: Thursday, October 09, 2003 11:43 AM
> To: ruby-talk ML
> Subject: encountering EOF not at the End Of File
>
>
> hi,
> i m reading binary files into strings ...
>
> str = file.read # reads till EOF
>
> ... and it sometimes happens that str.length is not equal the file
> length. so there must be EOF's somewhere in the stream before the
actual
> end.
>
> 1) how should i read a block of binary data from a file in ruby?
> 2) how would you store binary data in ruby?
> i want to hand the data to OpenGL which doesn t
> expect a specific type.
>
> thanks for help
> - Meinrad
>
>
>
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: encountering EOF not at the End Of File
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password