Class NSKeyedUnarchiver

    • Constructor Detail

      • NSKeyedUnarchiver

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • 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()
      • classForClassName_static

        public static org.moe.natj.objc.Class classForClassName_static​(java.lang.String codedName)
        During decoding, the coder first checks with the coder's own table, then if there was no mapping there, the class's.
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

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

        public static java.lang.String description_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

        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)
      • setClassForClassName_static

        public static void setClassForClassName_static​(org.moe.natj.objc.Class cls,
                                                       java.lang.String codedName)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • unarchiveObjectWithData

        public static java.lang.Object unarchiveObjectWithData​(NSData data)
      • unarchiveObjectWithFile

        public static java.lang.Object unarchiveObjectWithFile​(java.lang.String path)
      • unarchiveTopLevelObjectWithDataError

        public static java.lang.Object unarchiveTopLevelObjectWithDataError​(NSData data,
                                                                            org.moe.natj.general.ptr.Ptr<NSError> error)
      • version_static

        public static long version_static()
      • classForClassName

        public org.moe.natj.objc.Class classForClassName​(java.lang.String codedName)
      • containsValueForKey

        public boolean containsValueForKey​(java.lang.String key)
        Overrides:
        containsValueForKey in class NSCoder
      • decodeBoolForKey

        public boolean decodeBoolForKey​(java.lang.String key)
        Overrides:
        decodeBoolForKey in class NSCoder
      • decodeBytesForKeyReturnedLength

        public org.moe.natj.general.ptr.ConstBytePtr decodeBytesForKeyReturnedLength​(java.lang.String key,
                                                                                     org.moe.natj.general.ptr.NUIntPtr lengthp)
        returned bytes immutable, and they go away with the unarchiver, not the containing autorelease pool
        Overrides:
        decodeBytesForKeyReturnedLength in class NSCoder
      • decodeDoubleForKey

        public double decodeDoubleForKey​(java.lang.String key)
        Overrides:
        decodeDoubleForKey in class NSCoder
      • decodeFloatForKey

        public float decodeFloatForKey​(java.lang.String key)
        Overrides:
        decodeFloatForKey in class NSCoder
      • decodeInt32ForKey

        public int decodeInt32ForKey​(java.lang.String key)
        Overrides:
        decodeInt32ForKey in class NSCoder
      • decodeInt64ForKey

        public long decodeInt64ForKey​(java.lang.String key)
        Overrides:
        decodeInt64ForKey in class NSCoder
      • decodeIntForKey

        public int decodeIntForKey​(java.lang.String key)
        may raise a range exception
        Overrides:
        decodeIntForKey in class NSCoder
      • decodeObjectForKey

        public java.lang.Object decodeObjectForKey​(java.lang.String key)
        Overrides:
        decodeObjectForKey in class NSCoder
      • decodingFailurePolicy

        public long decodingFailurePolicy()
        Description copied from class: NSCoder
        Defines the behavior this NSCoder should take on decode failure (i.e. corrupt archive, invalid data, etc.). The default result of this property is NSDecodingFailurePolicyRaiseException, subclasses can change this to an alternative policy.
        Overrides:
        decodingFailurePolicy in class NSCoder
      • finishDecoding

        public void finishDecoding()
      • requiresSecureCoding

        public boolean requiresSecureCoding()
        Enables secure coding support on this keyed unarchiver. When enabled, unarchiving a disallowed class throws an exception. Once enabled, attempting to set requiresSecureCoding to NO will throw an exception. This is to prevent classes from selectively turning secure coding off. This is designed to be set once at the top level and remain on. Note that the getter is on the superclass, NSCoder. See NSCoder for more information about secure coding.
        Overrides:
        requiresSecureCoding in class NSCoder
      • setClassForClassName

        public void setClassForClassName​(org.moe.natj.objc.Class cls,
                                         java.lang.String codedName)
      • setDecodingFailurePolicy

        public void setDecodingFailurePolicy​(long value)
      • setRequiresSecureCoding

        public void setRequiresSecureCoding​(boolean value)
        Enables secure coding support on this keyed unarchiver. When enabled, unarchiving a disallowed class throws an exception. Once enabled, attempting to set requiresSecureCoding to NO will throw an exception. This is to prevent classes from selectively turning secure coding off. This is designed to be set once at the top level and remain on. Note that the getter is on the superclass, NSCoder. See NSCoder for more information about secure coding.
      • initForReadingFromDataError

        public NSKeyedUnarchiver initForReadingFromDataError​(NSData data,
                                                             org.moe.natj.general.ptr.Ptr<NSError> error)
        Initializes the receiver for decoding an archive previously encoded by \c NSKeyedUnarchiver. Enables \c requiresSecureCoding by default. If \c NSSecureCoding cannot be used, \c requiresSecureCoding may be turned off manually; for improved security, \c requiresSecureCoding should be left enabled whenever possible. Sets the unarchiver's \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid, and sets the \c error out parameter.
      • unarchivedObjectOfClassFromDataError

        public static java.lang.Object unarchivedObjectOfClassFromDataError​(org.moe.natj.objc.Class cls,
                                                                            NSData data,
                                                                            org.moe.natj.general.ptr.Ptr<NSError> error)
        Decodes the root object of the given class from the given archive, previously encoded by \c NSKeyedArchiver. Enables \c requiresSecureCoding and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid or cannot be decoded, and sets the \c error out parameter.
      • unarchivedObjectOfClassesFromDataError

        public static java.lang.Object unarchivedObjectOfClassesFromDataError​(NSSet<? extends org.moe.natj.objc.Class> classes,
                                                                              NSData data,
                                                                              org.moe.natj.general.ptr.Ptr<NSError> error)
        Decodes the root object of one of the given classes from the given archive, previously encoded by \c NSKeyedArchiver. Enables \c requiresSecureCoding and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid or cannot be decoded, and sets the \c error out parameter.
      • unarchivedArrayOfObjectsOfClassFromDataError

        public static NSArray<?> unarchivedArrayOfObjectsOfClassFromDataError​(org.moe.natj.objc.Class cls,
                                                                              NSData data,
                                                                              org.moe.natj.general.ptr.Ptr<NSError> error)
        Decodes the \c NSArray root object from \c data which should be an \c NSArray containing the given non-collection class (no nested arrays or arrays of dictionaries, etc) from the given archive, previously encoded by \c NSKeyedArchiver. Enables \c requiresSecureCoding and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid or cannot be decoded, and sets the \c error out parameter.
      • unarchivedArrayOfObjectsOfClassesFromDataError

        public static NSArray<?> unarchivedArrayOfObjectsOfClassesFromDataError​(NSSet<? extends org.moe.natj.objc.Class> classes,
                                                                                NSData data,
                                                                                org.moe.natj.general.ptr.Ptr<NSError> error)
        Decodes the \c NSArray root object from \c data which should be an \c NSArray, containing the given non-collection classes in \c classes (no nested arrays or arrays of dictionaries, etc) from the given archive, previously encoded by \c NSKeyedArchiver. Enables \c requiresSecureCoding and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid or cannot be decoded, and sets the \c error out parameter.
      • unarchivedDictionaryWithKeysOfClassObjectsOfClassFromDataError

        public static NSDictionary<?,​?> unarchivedDictionaryWithKeysOfClassObjectsOfClassFromDataError​(org.moe.natj.objc.Class keyCls,
                                                                                                             org.moe.natj.objc.Class valueCls,
                                                                                                             NSData data,
                                                                                                             org.moe.natj.general.ptr.Ptr<NSError> error)
        Decodes the \c NSDictionary root object from \c data which should be an \c NSDictionary with keys of type given in \c keyCls and objects of the given non-collection class \c objectCls (no nested dictionaries or other dictionaries contained in the dictionary, etc) from the given archive, previously encoded by \c NSKeyedArchiver. Enables \c requiresSecureCoding and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid or cannot be decoded, and sets the \c error out parameter.
      • unarchivedDictionaryWithKeysOfClassesObjectsOfClassesFromDataError

        public static NSDictionary<?,​?> unarchivedDictionaryWithKeysOfClassesObjectsOfClassesFromDataError​(NSSet<? extends org.moe.natj.objc.Class> keyClasses,
                                                                                                                 NSSet<? extends org.moe.natj.objc.Class> valueClasses,
                                                                                                                 NSData data,
                                                                                                                 org.moe.natj.general.ptr.Ptr<NSError> error)
        Decodes the \c NSDictionary root object from \c data which should be an \c NSDictionary, with keys of the types given in \c keyClasses and objects of the given non-collection classes in \c objectClasses (no nested dictionaries or other dictionaries contained in the dictionary, etc) from the given archive, previously encoded by \c NSKeyedArchiver. Enables \c requiresSecureCoding and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid or cannot be decoded, and sets the \c error out parameter.