public interface Peripheral
Peripheral interface represents peripheral devices in the system. This interface provides generic methods
for handling peripherals. Peripheral interface.| Modifier and Type | Field and Description |
|---|---|
static int |
BIG_ENDIAN
Big-endian byte or bit ordering.
|
static int |
LITTLE_ENDIAN
Little-endian byte or bit ordering.
|
static int |
MIXED_ENDIAN
Mixed-endian (non-standard) byte ordering.
|
static int |
UNDEFINED_ID
Undefined peripheral numerical ID.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes and releases the underlying peripheral device, making it available to other applications.
|
int |
getID()
Returns the numerical ID of the underlying peripheral device.
|
java.lang.String |
getName()
Returns the name of the underlying peripheral device.
|
java.lang.String[] |
getProperties()
The properties of this peripheral device.
|
boolean |
isOpen()
Indicates whether or not this peripheral is open/available to the calling application.
|
static final int BIG_ENDIAN
static final int LITTLE_ENDIAN
static final int MIXED_ENDIAN
static final int UNDEFINED_ID
void close()
throws java.io.IOException
Peripheral instance will result in a
PeripheralNotAvailableException being thrown.
This method has no effects if the peripheral device has already been closed.java.io.IOException - if an I/O error occurs.int getID()
PeripheralManager.open(java.lang.Class, com.oracle.deviceaccess.PeripheralConfig) the this peripheral's
numerical ID is undefined.UNDEFINED_ID if none is defined.java.lang.String getName()
null if none is defined.java.lang.String[] getProperties()
String array (a defensive copy) of the peripheral device properties or an empty String
array if none are defined.boolean isOpen()
true if, and only if, this peripheral is open; false otherwise.Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.