Samond Classes Library 1.2.6-STABLE build 219
List of all members
SCData Class Reference

Wrapper class for data objects. More...

#import <SCData.h>

+ Inheritance diagram for SCData:

Creating Class Instances

(instancetype) + dataWithData:
 

Initializing Class Instances

(instancetype) - initWithData:
 

Getting Data

(void) - getBytes:length:
 
(SCByte- getByte
 
(SCUByte- getUByte
 
(SCShort- getShort
 
(SCUShort- getUShort
 
(SCInteger- getInteger
 
(SCUInteger- getUInteger
 
(SCLong- getLong
 
(SCULong- getULong
 
(char) - getChar
 
(unichar) - getUnichar
 
(const char *) - getCharString
 
(BOOL) - getBool
 
(SCFloat- getFloat
 
(SCDouble- getDouble
 
(NSInteger) - getNSInteger
 
(NSUInteger) - getNSUInteger
 
(NSData *) - getDataWithLength:
 
(NSData *) - getData
 
(id) - getObject
 
(BOOL) - eod
 

Appending Data

(void) - appendByte:
 
(void) - appendUByte:
 
(void) - appendShort:
 
(void) - appendUShort:
 
(void) - appendInteger:
 
(void) - appendUInteger:
 
(void) - appendLong:
 
(void) - appendULong:
 
(void) - appendChar:
 
(void) - appendUnichar:
 
(void) - appendCharString:
 
(void) - appendBool:
 
(void) - appendFloat:
 
(void) - appendDouble:
 
(void) - appendNSInteger:
 
(void) - appendNSUInteger:
 
(void) - appendData:
 
(void) - appendObject:
 

Additional Inherited Members

- Instance Methods inherited from SCObject
(instancetype) - initWithCoder:
 
(instancetype) - initWithContentsOfSerializedFile:
 
(void) - encodeWithCoder:
 
(BOOL) - writeContentsToSerializedFile:
 
(instancetype) - initWithDataDictionary:
 
(instancetype) - initWithDataDictionaryFromFile:
 
(void) - writeToDataDictionary:
 
(void) - writeToDataDictionaryFile:atomically:
 
(void) - writeToDataDictionaryFile:
 
(NSDictionary *) - dataDictionary
 
(instancetype) - initWithStream:
 
(instancetype) - initWithFileStream:
 
(void) - writeToStream:
 
(void) - writeToFileStream:
 
(void) - appendToFileStream:
 
(id) - copyObject
 
(SCComparisonResult- compareWithObject:
 
(BOOL) - isEqual:
 
(instancetype) - initWithDataWrapper:
 
(instancetype) - initWithContentsOfFile:
 
(instancetype) - initWithContentsOfURL:
 
(instancetype) - initWithContentsOfURLString:
 
(void) - writeToData:
 
(BOOL) - writeToFile:
 
(BOOL) - writeToURL:
 
(BOOL) - writeToURLString:
 
(NSData *) - data
 
- Properties inherited from SCObject
NSString * className
 

Detailed Description

Wrapper class for data objects.

SDK
macOS 10.6+, iOS 7.0+, GNUstep
Since
version 1.2.3

Class provides advanced methods for reading and writing information from and to data objects NSData and NSMutableData. The class is used for simplification of the implementation interaction with data objects, because standard classes does not have means for seeking within the stored data. We don't recommend to use this class directly.

Method Documentation

- (void) appendBool: (BOOL)  value

Appends the specified boolean value into the receiving data.

Parameters
value- the appended value
- (void) appendByte: (SCByte value

Appends the specified signed 8-bit integer value into the receiving data.

Parameters
value- the appended value
- (void) appendChar: (char)  value

Appends the specified character into the receiving data.

Parameters
value- the appended character
See also
- getUnichar
- (void) appendCharString: (const char *)  string

Appends the specified character string into the receiving data.

Parameters
string- the appended character string
- (void) appendData: (NSData *)  data

Appends the data from the specified data object.

Parameters
data- the data object
- (void) appendDouble: (SCDouble value

Appends the specified double value into the receiving data.

Parameters
value- the appended value
- (void) appendFloat: (SCFloat value

Appends the specified float value into the receiving data.

Parameters
value- the appended value
- (void) appendInteger: (SCInteger value

Appends the specified signed 32-bit integer value into the receiving data.

Parameters
value- the appended value
- (void) appendLong: (SCLong value

Appends the specified signed 64-bit integer value into the receiving data.

Parameters
value- the appended value
- (void) appendNSInteger: (NSInteger)  value

Appends the specified NSInteger value into the receiving data.

Parameters
value- the appended value
- (void) appendNSUInteger: (NSUInteger)  value

Appends the specified NSUInteger value into the receiving data.

Parameters
value- the appended value
- (void) appendObject: (id<SCDating>)  object

Appends the specified class instance into the receiving data.

Parameters
object- the appended object
- (void) appendShort: (SCShort value

Appends the specified signed 16-bit integer value into the receiving data.

Parameters
value- the appended value
- (void) appendUByte: (SCUByte value

Appends the specified unsigned 8-bit integer value into the receiving data.

Parameters
value- the appended value
- (void) appendUInteger: (SCUInteger value

Appends the specified unsigned 32-bit integer value into the receiving data.

Parameters
value- the appended value
- (void) appendULong: (SCULong value

Appends the specified unsigned 64-bit integer value into the receiving data.

Parameters
value- the appended value
- (void) appendUnichar: (unichar)  value

Appends the specified character into the receiving data.

Parameters
value- the appended character
See also
- getChar
- (void) appendUShort: (SCUShort value

Appends the specified unsigned 16-bit integer value into the receiving data.

Parameters
value- the appended value
+ (instancetype) dataWithData: (NSData *)  data

Returns a class instance created by using the specified data object.

Parameters
data- the data object
Returns
A created class instance
- (BOOL) eod

Returns a boolean value that indicates whether the current offset is pointed to the end of the receiving data.

Returns
YES if the current offset is pointed to the end of the receiving data, otherwise NO
- (BOOL) getBool

Returns the boolean value from the receiving data at the current offset.

Returns
A boolean value
- (SCByte) getByte

Returns the signed 8-bit integer value from the receiving data at the current offset.

Returns
A signed 8-bit integer value
- (void) getBytes: (void *)  buffer
length: (NSUInteger)  length 

Copies a number of bytes from the current offset of the receiving data into a given buffer.

Parameters
buffer- the buffer into which to copy data
length- the number of bytes from the current offset of the receiving data to copy to buffer
- (char) getChar

Returns the character from the receiving data at the current offset.

Returns
A character
See also
- getUnichar
- (const char *) getCharString

Returns the character string from the receiving data at the current offset.

Returns
A character string
- (NSData *) getData

Returns the data object from the receiving wrapper.

Returns
A data object
- (NSData *) getDataWithLength: (SCSize length

Returns a data of the specified length from the receiving data since the current offset.

Parameters
length- the number of required bytes
Returns
A data object
- (SCDouble) getDouble

Returns the double value from the receiving data at the current offset.

Returns
A double value
- (SCFloat) getFloat

Returns the float value from the receiving data at the current offset.

Returns
A float value
- (SCInteger) getInteger

Returns the signed 32-bit integer value from the receiving data at the current offset.

Returns
A signed 32-bit integer value
- (SCLong) getLong

Returns the signed 64-bit integer value from the receiving data at the current offset.

Returns
A signed 64-bit integer value
- (NSInteger) getNSInteger

Returns the NSInteger value from the receiving data at the current offset.

Returns
An NSInteger value
- (NSUInteger) getNSUInteger

Returns the NSUInteger value from the receiving data at the current offset.

Returns
An NSUInteger value
- (id) getObject

Returns the class instance from the receiving data since the current offset.

Returns
A class instance
- (SCShort) getShort

Returns the signed 16-bit integer value from the receiving data at the current offset.

Returns
A signed 16-bit integer value
- (SCUByte) getUByte

Returns the unsigned 8-bit integer value from the receiving data at the current offset.

Returns
An unsigned 8-bit integer value
- (SCUInteger) getUInteger

Returns the unsigned 32-bit integer value from the receiving data at the current offset.

Returns
A unsigned 32-bit integer value
- (SCULong) getULong

Returns the unsigned 64-bit integer value from the receiving data at the current offset.

Returns
A unsigned 64-bit integer value
- (unichar) getUnichar

Returns the character from the receiving data at the current offset.

Returns
A character
See also
- getChar
- (SCUShort) getUShort

Returns the unsigned 16-bit integer value from the receiving data at the current offset.

Returns
A unsigned 16-bit integer value
- (instancetype) initWithData: (NSData *)  data

Initializes a class instance using the specified data object.

Parameters
data- the data object
Returns
A newly initialized class instance

Reimplemented from SCObject.


The documentation for this class was generated from the following files: