Which is the right class to use dealing with binary data files?

j g jimg1968 at yahoo.com.cn
Sun Oct 10 14:20:48 UTC 2004


Thank you Bert. I'll try it out.
(And who knows why yahoo always adds an empty attachment to my mail to the list? It's strange.)

Bert Freudenberg <bert at impara.de> wrote:

Am 10.10.2004 um 09:23 schrieb j g:

> I want to read from data files created by my stock software, and I 
> know it's in binary mode. Exactly, it's written by some C function as 
> Long or Int32.
> Can't find a suitable filestream class to deal with it. For example I 
> need a nextLong/nextInt32, nextLongPut:, etc.

Just use the standard file stream. Binary reading is implemented in 
PositionableStream, which is a superclass of all file streams.

You need to be careful about endianness, of course.

- Bert -



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20041010/5f8be4c6/attachment.htm


More information about the Squeak-dev mailing list