gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FILE* interface to NSString or NSData?


From: Michael Hopkins
Subject: Re: FILE* interface to NSString or NSData?
Date: Tue, 20 Mar 2007 16:28:39 +0000
User-agent: Microsoft-Entourage/11.3.3.061214

On 19/3/07 20:33, "Fred Kiefer" <address@hidden> wrote:

The class you are asking for is NSStream plus its subclasses
NSInputStream and NSOutputStream.


Michael Hopkins wrote:
>
> We want to convert a C library that reads from and writes to binary
> FILE* descriptors using fread() & fwrite() to do the same thing but
> accessing e.g. NSString or NSData objects instead.
>
> Is there some accepted (cross-platform safe) way of doing this using
> Foundation/GNUstep-base?  We have the whole compatible subset of
> Cocoa Foundation and GNUstep-base available if a solution needs other
> classes to be involved.


Thanks a lot Fred

NSInputStream was perfect for reading and I used [NSMutableData appendBytes: length: ] for the output.

Michael


_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

        _/    _/   _/_/_/             Hopkins Research Ltd
       _/    _/   _/    _/             
      _/_/_/_/   _/_/_/          http://www.hopkins-research.com/
     _/    _/   _/   _/            
    _/    _/   _/     _/               'touch the future'
                                            
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]