Top Description Fields Constructors Methods
com.sun.jna.platform.mac

public Class IOReturnException

extends RuntimeException
Class Inheritance

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.

Field Summary

Modifier and TypeField and Description
private int
private static final long

Constructor Summary

AccessConstructor and Description
public
IOReturnException(int
The return value
kr
)

New exception from kern_return_t

protected
IOReturnException(int
The return value
kr
,
String
The exception message
msg
)

New exception from kern_return_t with specified message

Method Summary

Modifier and TypeMethod and Description
private static String
formatMessage(int kr)

public static int

Returns:

the return code
getCode
(int
The return value
kr
)

The low 14 bits of the return value encode the return code.

public int

Returns:

the IOReturn code
getIOReturnCode
()

public static int

Returns:

the subsystem value
getSubSystem
(int
The return value
kr
)

The middle 12 bits of the return value encode the subsystem.

public static int

Returns:

the system value
getSystem
(int
The return value
kr
)

The high 6 bits of the return value encode the system.

Field Detail

ioReturnback to summary
private int ioReturn
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Constructor Detail

IOReturnExceptionback to summary
public IOReturnException(int kr)

New exception from kern_return_t

Parameters
kr:int

The return value

IOReturnExceptionback to summary
protected IOReturnException(int kr, String msg)

New exception from kern_return_t with specified message

Parameters
kr:int

The return value

msg:String

The exception message

Method Detail

formatMessageback to summary
private static String formatMessage(int kr)
getCodeback to summary
public static int getCode(int kr)

The low 14 bits of the return value encode the return code.

Parameters
kr:int

The return value

Returns:int

the return code

getIOReturnCodeback to summary
public int getIOReturnCode()
Returns:int

the IOReturn code

getSubSystemback to summary
public static int getSubSystem(int kr)

The middle 12 bits of the return value encode the subsystem.

Parameters
kr:int

The return value

Returns:int

the subsystem value

getSystemback to summary
public static int getSystem(int kr)

The high 6 bits of the return value encode the system.

Parameters
kr:int

The return value

Returns:int

the system value