X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/00792f13efcd8fcf9b175e564b153805b8fb1a23..68089b190f6a03c185722c8532197dacabf52f8d:/ITByteStream.h diff --git a/ITByteStream.h b/ITByteStream.h index ceab156..3dce5c6 100755 --- a/ITByteStream.h +++ b/ITByteStream.h @@ -7,18 +7,24 @@ // #import +#import "ITConveniences.h" -/*! @class ITByteStream - * @abstract A FIFO bytestream - */ +@class ITByteStream; -@interface ITByteStream : NSObject { +@interface ITByteStream : NSObject { + @public NSMutableData *data; @private NSLock *lock; + id delegate; } --(id) initWithStream:(ITByteStream*)stream; +-(id) initWithStream:(ITByteStream*)stream delegate:(id )d; -(int) availableDataLength; -(NSData*) readDataOfLength:(int)length; --(void) writeData:(NSData*)data; +-(NSData*) readAllData; +-(void) writeData:(in NSData*)data; +-(void) writeBytes:(in char *)b len:(long)length; +-(void) lockStream; +-(void) unlockStream; +-(void) shortenData:(long)length; @end