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