Skip navigation links
JNA API 5.6.0
com.sun.jna.platform.mac

Class IOReturnException

  • All Implemented Interfaces:
    java.io.Serializable


    public class IOReturnException
    extends java.lang.RuntimeException
    Exception encapsulating IOReturn I/O Kit Error Return Values, defined as kern_return_t values in IOKit/IOReturn.h

    The return value supplies information in three separate bit fields: the high 6 bits specify the system in which the error occurred, the next 12 bits specify the subsystem, and the final 14 bits specify the error code itself.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor and Description
        IOReturnException(int kr)
      New exception from kern_return_t
      protected IOReturnException(int kr, java.lang.String msg)
      New exception from kern_return_t with specified message
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static int getCode(int kr)
      The low 14 bits of the return value encode the return code.
      int getIOReturnCode() 
      static int getSubSystem(int kr)
      The middle 12 bits of the return value encode the subsystem.
      static int getSystem(int kr)
      The high 6 bits of the return value encode the system.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • IOReturnException

        public IOReturnException(int kr)
        New exception from kern_return_t
        Parameters:
        kr - The return value
      • IOReturnException

        protected IOReturnException(int kr,
                                    java.lang.String msg)
        New exception from kern_return_t with specified message
        Parameters:
        kr - The return value
        msg - The exception message
    • Method Detail

      • getIOReturnCode

        public int getIOReturnCode()
        Returns:
        the IOReturn code
      • getSystem

        public static int getSystem(int kr)
        The high 6 bits of the return value encode the system.
        Parameters:
        kr - The return value
        Returns:
        the system value
      • getSubSystem

        public static int getSubSystem(int kr)
        The middle 12 bits of the return value encode the subsystem.
        Parameters:
        kr - The return value
        Returns:
        the subsystem value
      • getCode

        public static int getCode(int kr)
        The low 14 bits of the return value encode the return code.
        Parameters:
        kr - The return value
        Returns:
        the return code
JNA API 5.6.0

Copyright © 2007-2018 Timothy Wall. All Rights Reserved.