NSData extension type

NSData

on
Implemented types
Implementers
Available extensions

Constructors

NSData()
Returns a new instance of NSData constructed with the default new method.
NSData.as(ObjCObject other)
Constructs a NSData that points to the same underlying object as other.
NSData.fromPointer(Pointer<ObjCObjectImpl> other, {bool retain = false, bool release = false})
Constructs a NSData that wraps the given raw object pointer.

Properties

bytes Pointer<Void>

Available on NSData, provided by the NSData$Methods extension

bytes
no setter
debugDescription NSString

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

debugDescription
no setter
description NSString

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

description
no setter
description$1 NSString

Available on NSData, provided by the NSExtendedData extension

description
no setter
hash int

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

hash
no setter
hashCode int
The hash code for this object.
no setterinherited
isProxy bool

Available on NSObject, provided by the NSObject$Methods extension

isProxy
no setter
isProxy bool

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

isProxy
no setter
length int

Available on NSData, provided by the NSData$Methods extension

length
no setter
object$ ObjCObject
final
ref ObjCObjectRef
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
superclass ObjCObject

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

superclass
no setter

Methods

addObserver(Observer observer, {required NSString forKeyPath, int options = NSKeyValueObservingOptions.NSKeyValueObservingOptionNew, Pointer<Void>? context}) Observation

Available on NSObject, provided by the Observed extension

Registers the Observer to receive KVO notifications for the key path relative to this NSObject.
autorelease() NSObjectProtocol

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

autorelease
class$() ObjCObject

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

class
compressedDataUsingAlgorithm(NSDataCompressionAlgorithm algorithm) NSData?

Available on NSData, provided by the NSData$Methods extension

compressedDataUsingAlgorithm:error:
conformsToProtocol(Protocol aProtocol) bool

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

conformsToProtocol:
copy() ObjCObject

Available on NSObject, provided by the NSObject$Methods extension

copy
copyWithZone(Pointer<NSZone> zone) ObjCObject

Available on NSCopying, provided by the NSCopying$Methods extension

copyWithZone:
dealloc() → void

Available on NSObject, provided by the NSObject$Methods extension

dealloc
decompressedDataUsingAlgorithm(NSDataCompressionAlgorithm algorithm) NSData?

Available on NSData, provided by the NSData$Methods extension

decompressedDataUsingAlgorithm:error:
doesNotRecognizeSelector(Pointer<ObjCSelector> aSelector) → void

Available on NSObject, provided by the NSObject$Methods extension

doesNotRecognizeSelector:
encodeWithCoder(NSCoder coder) → void

Available on NSCoding, provided by the NSCoding$Methods extension

encodeWithCoder:
encodeWithCoder(NSCoder coder) → void

Available on NSData, provided by the NSData$Methods extension

encodeWithCoder:
encodeWithCoder(NSCoder coder) → void

Available on NSSecureCoding, provided by the NSSecureCoding$Methods extension

encodeWithCoder:
enumerateByteRangesUsingBlock(ObjCBlock<Void Function(Pointer<Void>, NSRange, Pointer<Bool>)> block) → void

Available on NSData, provided by the NSExtendedData extension

enumerateByteRangesUsingBlock:
forwardingTargetForSelector(Pointer<ObjCSelector> aSelector) ObjCObject

Available on NSObject, provided by the NSObject$Methods extension

forwardingTargetForSelector:
forwardInvocation(NSInvocation anInvocation) → void

Available on NSObject, provided by the NSObject$Methods extension

forwardInvocation:
getBytes(Pointer<Void> buffer, {required int length}) → void

Available on NSData, provided by the NSExtendedData extension

getBytes:length:
getBytes$1(Pointer<Void> buffer, {required NSRange range}) → void

Available on NSData, provided by the NSExtendedData extension

getBytes:range:
init() NSData

Available on NSData, provided by the NSData$Methods extension

init
init() NSObject

Available on NSObject, provided by the NSObject$Methods extension

init
initWithBase64EncodedData(NSData base64Data, {required int options}) NSData?

Available on NSData, provided by the NSData$Methods extension

initWithBase64EncodedData:options:
initWithBase64EncodedString(NSString base64String, {required int options}) NSData?

Available on NSData, provided by the NSData$Methods extension

initWithBase64EncodedString:options:
initWithBytes(Pointer<Void> bytes, {required int length}) NSData

Available on NSData, provided by the NSData$Methods extension

initWithBytes:length:
initWithBytesNoCopy(Pointer<Void> bytes, {required int length}) NSData

Available on NSData, provided by the NSData$Methods extension

initWithBytesNoCopy:length:
initWithBytesNoCopy$1(Pointer<Void> bytes, {required int length, ObjCBlock<Void Function(Pointer<Void>, UnsignedLong)>? deallocator}) NSData

Available on NSData, provided by the NSData$Methods extension

initWithBytesNoCopy:length:deallocator:
initWithBytesNoCopy$2(Pointer<Void> bytes, {required int length, required bool freeWhenDone}) NSData

Available on NSData, provided by the NSData$Methods extension

initWithBytesNoCopy:length:freeWhenDone:
initWithCoder(NSCoder coder) NSData?

Available on NSData, provided by the NSData$Methods extension

initWithCoder:
initWithCoder(NSCoder coder) NSSecureCoding?

Available on NSSecureCoding, provided by the NSSecureCoding$Methods extension

initWithCoder:
initWithCoder(NSCoder coder) NSCoding?

Available on NSCoding, provided by the NSCoding$Methods extension

initWithCoder:
initWithContentsOfFile(NSString path) NSData?

Available on NSData, provided by the NSData$Methods extension

initWithContentsOfFile:
initWithContentsOfFile$1(NSString path, {required int options, required Pointer<Pointer<ObjCObjectImpl>> error}) NSData?

Available on NSData, provided by the NSData$Methods extension

initWithContentsOfFile:options:error:
initWithContentsOfURL(NSURL url) NSData?

Available on NSData, provided by the NSData$Methods extension

initWithContentsOfURL:
initWithContentsOfURL$1(NSURL url, {required int options, required Pointer<Pointer<ObjCObjectImpl>> error}) NSData?

Available on NSData, provided by the NSData$Methods extension

initWithContentsOfURL:options:error:
initWithData(NSData data) NSData

Available on NSData, provided by the NSData$Methods extension

initWithData:
isEqual(ObjCObject object) bool

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

isEqual:
isEqual(ObjCObject object) bool

Available on NSObject, provided by the NSObject$Methods extension

isEqual:
isEqualToData(NSData other) bool

Available on NSData, provided by the NSExtendedData extension

isEqualToData:
isKindOfClass(ObjCObject aClass) bool

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

isKindOfClass:
isKindOfClass(ObjCObject aClass) bool

Available on NSObject, provided by the NSObject$Methods extension

isKindOfClass:
isMemberOfClass(ObjCObject aClass) bool

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

isMemberOfClass:
isMemberOfClass(ObjCObject aClass) bool

Available on NSObject, provided by the NSObject$Methods extension

isMemberOfClass:
methodForSelector(Pointer<ObjCSelector> aSelector) Pointer<NativeFunction<Void Function()>>

Available on NSObject, provided by the NSObject$Methods extension

methodForSelector:
methodSignatureForSelector(Pointer<ObjCSelector> aSelector) NSMethodSignature

Available on NSObject, provided by the NSObject$Methods extension

methodSignatureForSelector:
mutableCopy() ObjCObject

Available on NSObject, provided by the NSObject$Methods extension

mutableCopy
mutableCopyWithZone(Pointer<NSZone> zone) ObjCObject

Available on NSMutableCopying, provided by the NSMutableCopying$Methods extension

mutableCopyWithZone:
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performSelector(Pointer<ObjCSelector> aSelector) ObjCObject

Available on NSObject, provided by the NSObject$Methods extension

performSelector:
performSelector(Pointer<ObjCSelector> aSelector) ObjCObject

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

performSelector:
performSelector$1(Pointer<ObjCSelector> aSelector, {required ObjCObject withObject}) ObjCObject

Available on NSObject, provided by the NSObject$Methods extension

performSelector:withObject:
performSelector$1(Pointer<ObjCSelector> aSelector, {required ObjCObject withObject}) ObjCObject

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

performSelector:withObject:
performSelector$2(Pointer<ObjCSelector> aSelector, {required ObjCObject withObject, required ObjCObject withObject$1}) ObjCObject

Available on NSObject, provided by the NSObject$Methods extension

performSelector:withObject:withObject:
performSelector$2(Pointer<ObjCSelector> aSelector, {required ObjCObject withObject, required ObjCObject withObject$1}) ObjCObject

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

performSelector:withObject:withObject:
rangeOfData(NSData dataToFind, {required int options, required NSRange range}) NSRange

Available on NSData, provided by the NSExtendedData extension

rangeOfData:options:range:
release() → void

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

release
respondsToSelector(Pointer<ObjCSelector> sel) bool

Available on ObjCObject, provided by the RespondsToSelector extension

respondsToSelector(Pointer<ObjCSelector> aSelector) bool

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

respondsToSelector:
retain() NSObjectProtocol

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

retain
retainCount() int

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

retainCount
self() NSObjectProtocol

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

self
subdataWithRange(NSRange range) NSData

Available on NSData, provided by the NSExtendedData extension

subdataWithRange:
toList() Uint8List

Available on NSData, provided by the NSDataExtensions extension

Return a list containing the contents of the NSData.
toString() String
A string representation of this object.
inherited
writeToFile(NSString path, {required bool atomically}) bool

Available on NSData, provided by the NSExtendedData extension

writeToFile:atomically:
writeToFile$1(NSString path, {required int options, required Pointer<Pointer<ObjCObjectImpl>> error}) bool

Available on NSData, provided by the NSExtendedData extension

writeToFile:options:error:
writeToURL(NSURL url, {required bool atomically}) bool

Available on NSData, provided by the NSExtendedData extension

writeToURL:atomically:
writeToURL$1(NSURL url, {required int options, required Pointer<Pointer<ObjCObjectImpl>> error}) bool

Available on NSData, provided by the NSExtendedData extension

writeToURL:options:error:
zone() Pointer<NSZone>

Available on NSObject, provided by the NSObject$Methods extension

zone
zone() Pointer<NSZone>

Available on NSObjectProtocol, provided by the NSObjectProtocol$Methods extension

zone

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) int

Available on NSData, provided by the NSDataExtensions extension

Return the value of bytes at the given index.

Static Methods

alloc() NSData
alloc
override
allocWithZone(Pointer<NSZone> zone) NSData
allocWithZone:
override
data() NSData
data
dataWithBytes(Pointer<Void> bytes, {required int length}) NSData
dataWithBytes:length:
dataWithBytesNoCopy(Pointer<Void> bytes, {required int length}) NSData
dataWithBytesNoCopy:length:
dataWithBytesNoCopy$1(Pointer<Void> bytes, {required int length, required bool freeWhenDone}) NSData
dataWithBytesNoCopy:length:freeWhenDone:
dataWithContentsOfFile(NSString path) NSData?
dataWithContentsOfFile:
dataWithContentsOfFile$1(NSString path, {required int options, required Pointer<Pointer<ObjCObjectImpl>> error}) NSData?
dataWithContentsOfFile:options:error:
dataWithContentsOfURL(NSURL url) NSData?
dataWithContentsOfURL:
dataWithContentsOfURL$1(NSURL url, {required int options, required Pointer<Pointer<ObjCObjectImpl>> error}) NSData?
dataWithContentsOfURL:options:error:
dataWithData(NSData data) NSData
dataWithData:
getSupportsSecureCoding() bool
supportsSecureCoding
isA(ObjCObject obj) bool
Returns whether obj is an instance of NSData.
override
new$() NSData
new
override