Package apple.foundation
Class NSData
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.foundation.NSData
-
- All Implemented Interfaces:
CKRecordValue,NSCoding,NSCopying,NSMutableCopying,NSSecureCoding,NSObject
- Direct Known Subclasses:
NSMutableData
public class NSData extends NSObject implements NSCopying, NSMutableCopying, NSSecureCoding, CKRecordValue
Immutable Data ***************
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceNSData.Block_enumerateByteRangesUsingBlockstatic interfaceNSData.Block_initWithBytesNoCopyLengthDeallocator-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSData(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean_supportsSecureCoding()This property must return YES on all classes that allow secure coding.static booleanaccessInstanceVariablesDirectly()static NSDataalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)NSDatabase64EncodedDataWithOptions(long options)Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options.java.lang.Stringbase64EncodedStringWithOptions(long options)Create a Base-64 encoded NSString from the receiver's contents using the given options.java.lang.Stringbase64Encoding()Deprecated.org.moe.natj.general.ptr.ConstVoidPtrbytes()The -bytes method returns a pointer to a contiguous region of memory managed by the receiver.static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()java.lang.ObjectcompressedDataUsingAlgorithmError(long algorithm, org.moe.natj.general.ptr.Ptr<NSError> error)java.lang.ObjectcopyWithZone(org.moe.natj.general.ptr.VoidPtr zone)static NSDatadata()static NSDatadataWithBytesLength(org.moe.natj.general.ptr.ConstVoidPtr bytes, long length)static NSDatadataWithBytesNoCopyLength(org.moe.natj.general.ptr.VoidPtr bytes, long length)static NSDatadataWithBytesNoCopyLengthFreeWhenDone(org.moe.natj.general.ptr.VoidPtr bytes, long length, boolean b)static NSDatadataWithContentsOfFile(java.lang.String path)static NSDatadataWithContentsOfFileOptionsError(java.lang.String path, long readOptionsMask, org.moe.natj.general.ptr.Ptr<NSError> errorPtr)static NSDatadataWithContentsOfMappedFile(java.lang.String path)Deprecated.static NSDatadataWithContentsOfURL(NSURL url)static NSDatadataWithContentsOfURLOptionsError(NSURL url, long readOptionsMask, org.moe.natj.general.ptr.Ptr<NSError> errorPtr)static NSDatadataWithData(NSData data)static java.lang.StringdebugDescription_static()java.lang.ObjectdecompressedDataUsingAlgorithmError(long algorithm, org.moe.natj.general.ptr.Ptr<NSError> error)These methods return a compressed or decompressed version of the receiver using the specified algorithm.java.lang.Stringdescription()voidencodeWithCoder(NSCoder coder)voidenumerateByteRangesUsingBlock(NSData.Block_enumerateByteRangesUsingBlock block)'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES.voidgetBytes(org.moe.natj.general.ptr.VoidPtr buffer)Deprecated.voidgetBytesLength(org.moe.natj.general.ptr.VoidPtr buffer, long length)voidgetBytesRange(org.moe.natj.general.ptr.VoidPtr buffer, NSRange range)static longhash_static()NSDatainit()NSDatainitWithBase64EncodedDataOptions(NSData base64Data, long options)Create an NSData from a Base-64, UTF-8 encoded NSData.NSDatainitWithBase64EncodedStringOptions(java.lang.String base64String, long options)Create an NSData from a Base-64 encoded NSString using the given options.NSDatainitWithBase64Encoding(java.lang.String base64String)Deprecated.NSDatainitWithBytesLength(org.moe.natj.general.ptr.ConstVoidPtr bytes, long length)NSDatainitWithBytesNoCopyLength(org.moe.natj.general.ptr.VoidPtr bytes, long length)NSDatainitWithBytesNoCopyLengthDeallocator(org.moe.natj.general.ptr.VoidPtr bytes, long length, NSData.Block_initWithBytesNoCopyLengthDeallocator deallocator)NSDatainitWithBytesNoCopyLengthFreeWhenDone(org.moe.natj.general.ptr.VoidPtr bytes, long length, boolean b)NSDatainitWithCoder(NSCoder coder)NS_DESIGNATED_INITIALIZERNSDatainitWithContentsOfFile(java.lang.String path)NSDatainitWithContentsOfFileOptionsError(java.lang.String path, long readOptionsMask, org.moe.natj.general.ptr.Ptr<NSError> errorPtr)NSDatainitWithContentsOfMappedFile(java.lang.String path)Deprecated.NSDatainitWithContentsOfURL(NSURL url)NSDatainitWithContentsOfURLOptionsError(NSURL url, long readOptionsMask, org.moe.natj.general.ptr.Ptr<NSError> errorPtr)NSDatainitWithData(NSData data)static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)booleanisEqualToData(NSData other)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)longlength()java.lang.ObjectmutableCopyWithZone(org.moe.natj.general.ptr.VoidPtr zone)static java.lang.Objectnew_objc()NSRangerangeOfDataOptionsRange(NSData dataToFind, long mask, NSRange searchRange)static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)static voidsetVersion_static(long aVersion)NSDatasubdataWithRange(NSRange range)static org.moe.natj.objc.Classsuperclass_static()static booleansupportsSecureCoding()static longversion_static()booleanwriteToFileAtomically(java.lang.String path, boolean useAuxiliaryFile)booleanwriteToFileOptionsError(java.lang.String path, long writeOptionsMask, org.moe.natj.general.ptr.Ptr<NSError> errorPtr)booleanwriteToURLAtomically(NSURL url, boolean atomically)the atomically flag is ignored if the url is not of a type the supports atomic writesbooleanwriteToURLOptionsError(NSURL url, long writeOptionsMask, org.moe.natj.general.ptr.Ptr<NSError> errorPtr)-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description_static, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static NSData alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
data
public static NSData data()
-
dataWithBytesLength
public static NSData dataWithBytesLength(org.moe.natj.general.ptr.ConstVoidPtr bytes, long length)
-
dataWithBytesNoCopyLength
public static NSData dataWithBytesNoCopyLength(org.moe.natj.general.ptr.VoidPtr bytes, long length)
-
dataWithBytesNoCopyLengthFreeWhenDone
public static NSData dataWithBytesNoCopyLengthFreeWhenDone(org.moe.natj.general.ptr.VoidPtr bytes, long length, boolean b)
-
dataWithContentsOfFile
public static NSData dataWithContentsOfFile(java.lang.String path)
-
dataWithContentsOfFileOptionsError
public static NSData dataWithContentsOfFileOptionsError(java.lang.String path, long readOptionsMask, org.moe.natj.general.ptr.Ptr<NSError> errorPtr)
-
dataWithContentsOfMappedFile
@Deprecated public static NSData dataWithContentsOfMappedFile(java.lang.String path)
Deprecated.
-
dataWithContentsOfURLOptionsError
public static NSData dataWithContentsOfURLOptionsError(NSURL url, long readOptionsMask, org.moe.natj.general.ptr.Ptr<NSError> errorPtr)
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
supportsSecureCoding
public static boolean supportsSecureCoding()
-
version_static
public static long version_static()
-
base64EncodedDataWithOptions
public NSData base64EncodedDataWithOptions(long options)
Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options.
-
base64EncodedStringWithOptions
public java.lang.String base64EncodedStringWithOptions(long options)
Create a Base-64 encoded NSString from the receiver's contents using the given options.
-
base64Encoding
@Deprecated public java.lang.String base64Encoding()
Deprecated.
-
bytes
public org.moe.natj.general.ptr.ConstVoidPtr bytes()
The -bytes method returns a pointer to a contiguous region of memory managed by the receiver. If the regions of memory represented by the receiver are already contiguous, it does so in O(1) time, otherwise it may take longer Using -enumerateByteRangesUsingBlock: will be efficient for both contiguous and discontiguous data.
-
copyWithZone
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
- Specified by:
copyWithZonein interfaceNSCopying
-
description
public java.lang.String description()
- Specified by:
descriptionin interfaceNSObject- Overrides:
descriptionin classNSObject
-
encodeWithCoder
public void encodeWithCoder(NSCoder coder)
- Specified by:
encodeWithCoderin interfaceNSCoding
-
enumerateByteRangesUsingBlock
public void enumerateByteRangesUsingBlock(NSData.Block_enumerateByteRangesUsingBlock block)
'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES.
-
getBytes
@Deprecated public void getBytes(org.moe.natj.general.ptr.VoidPtr buffer)
Deprecated.
-
getBytesLength
public void getBytesLength(org.moe.natj.general.ptr.VoidPtr buffer, long length)
-
getBytesRange
public void getBytesRange(org.moe.natj.general.ptr.VoidPtr buffer, NSRange range)
-
initWithBase64EncodedDataOptions
public NSData initWithBase64EncodedDataOptions(NSData base64Data, long options)
Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64.
-
initWithBase64EncodedStringOptions
public NSData initWithBase64EncodedStringOptions(java.lang.String base64String, long options)
Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64.
-
initWithBase64Encoding
@Deprecated public NSData initWithBase64Encoding(java.lang.String base64String)
Deprecated.These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0.
-
initWithBytesLength
public NSData initWithBytesLength(org.moe.natj.general.ptr.ConstVoidPtr bytes, long length)
-
initWithBytesNoCopyLength
public NSData initWithBytesNoCopyLength(org.moe.natj.general.ptr.VoidPtr bytes, long length)
-
initWithBytesNoCopyLengthDeallocator
public NSData initWithBytesNoCopyLengthDeallocator(org.moe.natj.general.ptr.VoidPtr bytes, long length, NSData.Block_initWithBytesNoCopyLengthDeallocator deallocator)
-
initWithBytesNoCopyLengthFreeWhenDone
public NSData initWithBytesNoCopyLengthFreeWhenDone(org.moe.natj.general.ptr.VoidPtr bytes, long length, boolean b)
-
initWithCoder
public NSData initWithCoder(NSCoder coder)
Description copied from interface:NSCodingNS_DESIGNATED_INITIALIZER- Specified by:
initWithCoderin interfaceNSCoding
-
initWithContentsOfFile
public NSData initWithContentsOfFile(java.lang.String path)
-
initWithContentsOfFileOptionsError
public NSData initWithContentsOfFileOptionsError(java.lang.String path, long readOptionsMask, org.moe.natj.general.ptr.Ptr<NSError> errorPtr)
-
initWithContentsOfMappedFile
@Deprecated public NSData initWithContentsOfMappedFile(java.lang.String path)
Deprecated.
-
initWithContentsOfURLOptionsError
public NSData initWithContentsOfURLOptionsError(NSURL url, long readOptionsMask, org.moe.natj.general.ptr.Ptr<NSError> errorPtr)
-
isEqualToData
public boolean isEqualToData(NSData other)
-
length
public long length()
-
mutableCopyWithZone
public java.lang.Object mutableCopyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
- Specified by:
mutableCopyWithZonein interfaceNSMutableCopying
-
rangeOfDataOptionsRange
public NSRange rangeOfDataOptionsRange(NSData dataToFind, long mask, NSRange searchRange)
-
_supportsSecureCoding
public boolean _supportsSecureCoding()
Description copied from interface:NSSecureCodingThis property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.- Specified by:
_supportsSecureCodingin interfaceNSSecureCoding
-
writeToFileAtomically
public boolean writeToFileAtomically(java.lang.String path, boolean useAuxiliaryFile)
-
writeToFileOptionsError
public boolean writeToFileOptionsError(java.lang.String path, long writeOptionsMask, org.moe.natj.general.ptr.Ptr<NSError> errorPtr)
-
writeToURLAtomically
public boolean writeToURLAtomically(NSURL url, boolean atomically)
the atomically flag is ignored if the url is not of a type the supports atomic writes
-
writeToURLOptionsError
public boolean writeToURLOptionsError(NSURL url, long writeOptionsMask, org.moe.natj.general.ptr.Ptr<NSError> errorPtr)
-
compressedDataUsingAlgorithmError
public java.lang.Object compressedDataUsingAlgorithmError(long algorithm, org.moe.natj.general.ptr.Ptr<NSError> error)
-
decompressedDataUsingAlgorithmError
public java.lang.Object decompressedDataUsingAlgorithmError(long algorithm, org.moe.natj.general.ptr.Ptr<NSError> error)These methods return a compressed or decompressed version of the receiver using the specified algorithm.
-
-