본문 바로가기

IOS 개발

[iOS] @interface NSData : NSObject

NSData

@interface NSData : NSObject

 

요약

메모리의 정적 바이트 버퍼.

Summary

A static byte buffer in memory.

 

 

Declaration

@interface NSData : NSObject

 

 

토론

NSData 및 해당 가변 서브 클래스 NSMutableData는 바이트 버퍼를 위한 데이터 객체 또는 객체 지향 래퍼를 제공합니다. 데이터 객체를 사용하면 간단한 할당된 버퍼 (포인터가 없는 데이터)를 통해 Foundation 객체의 동작을 수행 할 수 있습니다.

데이터의 크기는 이론적으로 약 8 엑사 바이트 (1 EB = 10¹⁸ 바이트)의 제한을 받습니다 (실제로 한도는 요인이 아니어야합니다).

NSData는 Core Foundation 대응 CFDataRef와 무료로 브리지됩니다. 무료 프리 브리징에 대한 자세한 내용은 무료 프리 브리징을 참조하십시오.

Discussion

NSData and its mutable subclass NSMutableData provide data objects, or object-oriented wrappers for byte buffers. Data objects let simple allocated buffers (that is, data with no embedded pointers) take on the behavior of Foundation objects.

The size of the data is subject to a theoretical limit of about 8 exabytes (1 EB = 10¹⁸ bytes; in practice, the limit should not be a factor).

NSData is toll-free bridged with its Core Foundation counterpart, CFDataRef. See Toll-Free Bridging for more information on toll-free bridging.

 

 

중요한

Foundation 프레임 워크에 대한 Swift 오버레이는 NSData 클래스 및 변경 가능한 서브 클래스 NSMutableData에 연결되는 데이터 구조를 제공합니다. 값 유형에 대한 자세한 내용은 Cocoa 및 Objective-C와 함께 Swift 사용 (Swift 4.1)에서 Cocoa 프레임 워크 작업을 참조하십시오.

Important

The Swift overlay to the Foundation framework provides the Data structure, which bridges to the NSData class and its mutable subclass NSMutableData. For more information about value types, see Working with Cocoa Frameworks in Using Swift with Cocoa and Objective-C (Swift 4.1).

 

 

 

 

[참조 : Open in Developer Documentation]

'IOS 개발' 카테고리의 다른 글

[iOS] var children: [UIViewController] { get }  (0) 2020.04.13
[iOS] class ZaloSDK : NSObject  (0) 2020.04.09
[iOS] protocol NSObjectProtocol  (0) 2020.04.09
[iOS] struct UIInterfaceOrientationMask  (0) 2020.04.06
[iOS] class LAContext : NSObject  (0) 2020.04.03