Class NSData

    • Constructor Detail

      • NSData

        protected NSData​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static NSData alloc()
      • allocWithZone

        public static NSData allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • data

        public static NSData data()
      • dataWithBytesLength

        public static NSData dataWithBytesLength​(@Nullable
                                                 @Nullable org.moe.natj.general.ptr.ConstVoidPtr bytes,
                                                 long length)
      • dataWithBytesNoCopyLength

        public static NSData dataWithBytesNoCopyLength​(@NotNull
                                                       @NotNull org.moe.natj.general.ptr.VoidPtr bytes,
                                                       long length)
      • dataWithBytesNoCopyLengthFreeWhenDone

        public static NSData dataWithBytesNoCopyLengthFreeWhenDone​(@NotNull
                                                                   @NotNull org.moe.natj.general.ptr.VoidPtr bytes,
                                                                   long length,
                                                                   boolean b)
      • dataWithContentsOfFile

        public static NSData dataWithContentsOfFile​(@NotNull
                                                    @NotNull java.lang.String path)
      • dataWithContentsOfFileOptionsError

        public static NSData dataWithContentsOfFileOptionsError​(@NotNull
                                                                @NotNull java.lang.String path,
                                                                long readOptionsMask,
                                                                @Nullable
                                                                @Nullable org.moe.natj.general.ptr.Ptr<NSError> errorPtr)
      • dataWithContentsOfMappedFile

        @Deprecated
        public static NSData dataWithContentsOfMappedFile​(@NotNull
                                                          @NotNull java.lang.String path)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 8.0 Deprecated-Message: Use +dataWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead.
      • dataWithContentsOfURL

        public static NSData dataWithContentsOfURL​(@NotNull
                                                   @NotNull NSURL url)
      • dataWithContentsOfURLOptionsError

        public static NSData dataWithContentsOfURLOptionsError​(@NotNull
                                                               @NotNull NSURL url,
                                                               long readOptionsMask,
                                                               @Nullable
                                                               @Nullable org.moe.natj.general.ptr.Ptr<NSError> errorPtr)
      • dataWithData

        public static NSData dataWithData​(@NotNull
                                          @NotNull NSData data)
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • hash_static

        public static long hash_static()
      • 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

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • new_objc

        public static NSData 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

        @NotNull
        public @NotNull NSData base64EncodedDataWithOptions​(long options)
        Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options. API-Since: 7.0
      • base64EncodedStringWithOptions

        @NotNull
        public @NotNull java.lang.String base64EncodedStringWithOptions​(long options)
        Create a Base-64 encoded NSString from the receiver's contents using the given options. API-Since: 7.0
      • base64Encoding

        @NotNull
        @Deprecated
        public @NotNull java.lang.String base64Encoding()
        Deprecated.
        API-Since: 4.0 Deprecated-Since: 7.0 Deprecated-Message: Use base64EncodedStringWithOptions: instead
      • bytes

        @NotNull
        public @NotNull 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

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • enumerateByteRangesUsingBlock

        public void enumerateByteRangesUsingBlock​(@NotNull
                                                  @NotNull 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. API-Since: 7.0
      • getBytes

        @Deprecated
        public void getBytes​(@NotNull
                             @NotNull org.moe.natj.general.ptr.VoidPtr buffer)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 8.0 Deprecated-Message: This method is unsafe because it could potentially cause buffer overruns. Use -getBytes:length: instead.
      • getBytesLength

        public void getBytesLength​(@NotNull
                                   @NotNull org.moe.natj.general.ptr.VoidPtr buffer,
                                   long length)
      • getBytesRange

        public void getBytesRange​(@NotNull
                                  @NotNull org.moe.natj.general.ptr.VoidPtr buffer,
                                  NSRange range)
      • initWithBase64EncodedDataOptions

        public NSData initWithBase64EncodedDataOptions​(@NotNull
                                                       @NotNull 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. API-Since: 7.0
      • initWithBase64EncodedStringOptions

        public NSData initWithBase64EncodedStringOptions​(@NotNull
                                                         @NotNull 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. API-Since: 7.0
      • initWithBase64Encoding

        @Deprecated
        public NSData initWithBase64Encoding​(@NotNull
                                             @NotNull 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. API-Since: 4.0 Deprecated-Since: 7.0 Deprecated-Message: Use initWithBase64EncodedString:options: instead
      • initWithBytesLength

        public NSData initWithBytesLength​(@Nullable
                                          @Nullable org.moe.natj.general.ptr.ConstVoidPtr bytes,
                                          long length)
      • initWithBytesNoCopyLength

        public NSData initWithBytesNoCopyLength​(@NotNull
                                                @NotNull org.moe.natj.general.ptr.VoidPtr bytes,
                                                long length)
      • initWithBytesNoCopyLengthFreeWhenDone

        public NSData initWithBytesNoCopyLengthFreeWhenDone​(@NotNull
                                                            @NotNull org.moe.natj.general.ptr.VoidPtr bytes,
                                                            long length,
                                                            boolean b)
      • initWithContentsOfFile

        public NSData initWithContentsOfFile​(@NotNull
                                             @NotNull java.lang.String path)
      • initWithContentsOfFileOptionsError

        public NSData initWithContentsOfFileOptionsError​(@NotNull
                                                         @NotNull java.lang.String path,
                                                         long readOptionsMask,
                                                         @Nullable
                                                         @Nullable org.moe.natj.general.ptr.Ptr<NSError> errorPtr)
      • initWithContentsOfMappedFile

        @Deprecated
        public NSData initWithContentsOfMappedFile​(@NotNull
                                                   @NotNull java.lang.String path)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 8.0 Deprecated-Message: Use -initWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead.
      • initWithContentsOfURL

        public NSData initWithContentsOfURL​(@NotNull
                                            @NotNull NSURL url)
      • initWithContentsOfURLOptionsError

        public NSData initWithContentsOfURLOptionsError​(@NotNull
                                                        @NotNull NSURL url,
                                                        long readOptionsMask,
                                                        @Nullable
                                                        @Nullable org.moe.natj.general.ptr.Ptr<NSError> errorPtr)
      • initWithData

        public NSData initWithData​(@NotNull
                                   @NotNull NSData data)
      • isEqualToData

        public boolean isEqualToData​(@NotNull
                                     @NotNull NSData other)
      • length

        public long length()
      • mutableCopyWithZone

        @NotNull
        public @NotNull java.lang.Object mutableCopyWithZone​(@Nullable
                                                             @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        mutableCopyWithZone in interface NSMutableCopying
      • rangeOfDataOptionsRange

        public NSRange rangeOfDataOptionsRange​(@NotNull
                                               @NotNull NSData dataToFind,
                                               long mask,
                                               NSRange searchRange)
        API-Since: 4.0
      • subdataWithRange

        @NotNull
        public @NotNull NSData subdataWithRange​(NSRange range)
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This 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:
        _supportsSecureCoding in interface NSSecureCoding
      • writeToFileAtomically

        public boolean writeToFileAtomically​(@NotNull
                                             @NotNull java.lang.String path,
                                             boolean useAuxiliaryFile)
      • writeToFileOptionsError

        public boolean writeToFileOptionsError​(@NotNull
                                               @NotNull java.lang.String path,
                                               long writeOptionsMask,
                                               @Nullable
                                               @Nullable org.moe.natj.general.ptr.Ptr<NSError> errorPtr)
      • writeToURLAtomically

        public boolean writeToURLAtomically​(@NotNull
                                            @NotNull 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​(@NotNull
                                              @NotNull NSURL url,
                                              long writeOptionsMask,
                                              @Nullable
                                              @Nullable org.moe.natj.general.ptr.Ptr<NSError> errorPtr)
      • compressedDataUsingAlgorithmError

        @Nullable
        public @Nullable NSData compressedDataUsingAlgorithmError​(long algorithm,
                                                                  @Nullable
                                                                  @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        API-Since: 13.0
      • decompressedDataUsingAlgorithmError

        @Nullable
        public @Nullable NSData decompressedDataUsingAlgorithmError​(long algorithm,
                                                                    @Nullable
                                                                    @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        These methods return a compressed or decompressed version of the receiver using the specified algorithm. API-Since: 13.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.