5 // Created by Alexander Strange on Thu Feb 27 2003.
6 // Copyright (c) 2003 __MyCompanyName__. All rights reserved.
9 #import <Foundation/Foundation.h>
12 @protocol DataReciever <NSObject>
13 -(oneway void)newDataAdded:(id)sender;
15 @interface ITByteStream : NSObject {
20 id <DataReciever> delegate;
22 -(id) initWithStream:(ITByteStream*)stream delegate:(id <DataReciever>)d;
23 -(int) availableDataLength;
24 -(NSData*) readDataOfLength:(int)length;
25 -(NSData*) readAllData;
26 -(void) writeData:(in NSData*)data;
27 -(void) writeBytes:(in char *)b len:(long)length;
30 -(void) shortenData:(long)length;
31 -initWithDelegate:(id)delegate;
32 -setDelegate:(id)delegate;