- Declared In:
- GPGME/GPGData.h
- - data:readDataOfLength:
- - data:writeData:
- - data:seekToFileOffset:offsetType:
- - dataRelease:
- (NSData *)data:(GPGData *)data readDataOfLength:(unsigned int)maxLength
Reads up to maxLength bytes of data and returns it. Returning an empty data or nil means that there is nothing more to read (EOF). Only required for input data objects.
Reading must be performed from the current position.
In case of error, raise a GPGException of type GPGError_E*.
Returned data will be copied.
- (unsigned long long)data:(GPGData *)data seekToFileOffset:(unsigned long long)fileOffset offsetType:(GPGDataOffsetType)offsetType
Changes the read/write position according to fileOffset and offsetType. Returns the new absolute position. Optional method.
In case of error, raise a GPGException of type GPGError_E*.
- (unsigned long long)data:(GPGData *)data writeData:(NSData *)writeData
Writes writeData from the current position. Returns the number of bytes written. Only required for output data objects.
In case of error, raise a GPGException of type GPGError_E*.
- (void)dataRelease:(GPGData *)data
Releases internal resources owned by the data source. Optional method.