Instance Method

decodeBytesForKey:returnedLength:

Decodes a buffer of data that was previously encoded with encodeBytes:length:forKey: and associated with the string key.

Declaration

- (const uint8_t *)decodeBytesForKey:(NSString *)key returnedLength:(NSUInteger *)lengthp;

Discussion

The buffer’s length is returned by reference in lengthp. The returned bytes are immutable. Subclasses must override this method if they perform keyed coding.

See Also

Decoding General Data

- decodeArrayOfObjCType:count:at:

Decodes an array of count items, whose Objective-C type is given by itemType.

- decodeBoolForKey:

Decodes and returns a boolean value that was previously encoded with encodeBool:forKey: and associated with the string key.

- decodeBytesWithReturnedLength:

Decodes a buffer of data whose types are unspecified.

- decodeDataObject

Decodes and returns an NSData object that was previously encoded with encodeDataObject:. Subclasses must override this method.

- decodeDoubleForKey:

Decodes and returns a double value that was previously encoded with either encodeFloat:forKey: or encodeDouble:forKey: and associated with the string key.

- decodeFloatForKey:

Decodes and returns a float value that was previously encoded with encodeFloat:forKey: or encodeDouble:forKey: and associated with the string key.

- decodeIntForKey:

Decodes and returns an int value that was previously encoded with encodeInt:forKey:, encodeInteger:forKey:, encodeInt32:forKey:, or encodeInt64:forKey: and associated with the string key.

- decodeIntegerForKey:

Decodes and returns an NSInteger value that was previously encoded with encodeInt:forKey:, encodeInteger:forKey:, encodeInt32:forKey:, or encodeInt64:forKey: and associated with the string key.

- decodeInt32ForKey:

Decodes and returns a 32-bit integer value that was previously encoded with encodeInt:forKey:, encodeInteger:forKey:, encodeInt32:forKey:, or encodeInt64:forKey: and associated with the string key.

- decodeInt64ForKey:

Decodes and returns a 64-bit integer value that was previously encoded with encodeInt:forKey:, encodeInteger:forKey:, encodeInt32:forKey:, or encodeInt64:forKey: and associated with the string key.

- decodeNXObject

Decodes an object previously written with encodeNXObject:.

Deprecated
- decodeObject

Decodes and returns an object that was previously encoded with any of the encode…Object methods.

- decodeObjectForKey:

Decodes and returns a previously-encoded object that was previously encoded with encodeObject:forKey: or encodeConditionalObject:forKey: and associated with the string key.

- decodePoint

Decodes and returns an NSPoint structure that was previously encoded with encodePoint:.

- decodePointForKey:

Decodes and returns an NSPoint structure that was previously encoded with encodePoint:forKey:.

- decodePropertyList

Decodes a property list that was previously encoded with encodePropertyList:.

- decodeRect

Decodes and returns an NSRect structure that was previously encoded with encodeRect:.

- decodeRectForKey:

Decodes and returns an NSRect structure that was previously encoded with encodeRect:forKey:.

- decodeSize

Decodes and returns an NSSize structure that was previously encoded with encodeSize:.

- decodeSizeForKey:

Decodes and returns an NSSize structure that was previously encoded with encodeSize:forKey:.

- decodeValueOfObjCType:at:

Decodes a single value, whose Objective-C type is given by valueType.

Deprecated
- decodeValueOfObjCType:at:size:

Decodes a single value of a known type from the specified data buffer.

- decodeValuesOfObjCTypes:

Decodes a series of potentially different Objective-C types.

- decodeObjectOfClass:forKey:

Decodes an object for the key, restricted to the specified class.

- decodeObjectOfClasses:forKey:

Decodes an object for the key, restricted to the specified classes.

- decodePropertyListForKey:

Returns a decoded property list for the specified key.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software