public class WakeUpUtil extends Object
Modifier and Type | Field and Description |
---|---|
static InetAddress |
DEFAULT_HOST
The default wakeup host: 255.255.255.255 (limited broadcast address).
|
static int |
DEFAULT_PORT
The default wakeup port: 9
|
Modifier and Type | Method and Description |
---|---|
protected static byte[] |
createWakeupFrame(EthernetAddress ethernetAddress)
Creates the byte representation of a wakeupframe for the given ethernet address.
|
static void |
wakeup(EthernetAddress ethernetAddress)
Wakes up the machine with the provided ethernet address, using the default port and host.
|
static void |
wakeup(EthernetAddress[] ethernetAddresses)
Wakes up the machines with the provided ethernet addresses, using the default port and host.
|
static void |
wakeup(EthernetAddress[] ethernetAddresses,
InetAddress host)
Wakes up the machines with provided ethernet address.
|
static void |
wakeup(EthernetAddress[] ethernetAddresses,
InetAddress host,
int port)
Wakes up the machines with provided ethernet addresses.
|
static void |
wakeup(EthernetAddress ethernetAddress,
InetAddress host)
Wakes up the machine with the provided ethernet addresses, using the default port.
|
static void |
wakeup(EthernetAddress ethernetAddress,
InetAddress host,
int port)
Wakes up the machines with provided ethernet address.
|
public static final InetAddress DEFAULT_HOST
public static final int DEFAULT_PORT
public static void wakeup(EthernetAddress ethernetAddress) throws IOException
ethernetAddress
- the ethernet address to wake upIOException
- if an I/O error occursDEFAULT_HOST
,
DEFAULT_PORT
public static void wakeup(EthernetAddress[] ethernetAddresses) throws IOException
ethernetAddresses
- the ethernet addresses to wake upIOException
- if an I/O error occursDEFAULT_HOST
,
DEFAULT_PORT
public static void wakeup(EthernetAddress ethernetAddress, InetAddress host) throws IOException
ethernetAddress
- the ethernet address to wake uphost
- the host, the magic sequence will be send toIOException
- if an I/O error occursDEFAULT_PORT
public static void wakeup(EthernetAddress[] ethernetAddresses, InetAddress host) throws IOException
WakeUpUtil.wakeup(ethernetAddresses, host, DEFAULT_PORT);
ethernetAddresses
- the ethernet addresses to wake uphost
- the host, the magic sequence will be send toIOException
- if an I/O error occursDEFAULT_PORT
public static void wakeup(EthernetAddress ethernetAddress, InetAddress host, int port) throws IOException
wakeup(new EthernetAddress[]{ethernetAddress}, host, port);
ethernetAddress
- the ethernet address to wake uphost
- the host, the magic sequence will be send toport
- the port numberIOException
- if an I/O error occurswakeup(EthernetAddress[], InetAddress, int)
public static void wakeup(EthernetAddress[] ethernetAddresses, InetAddress host, int port) throws IOException
ethernetAddresses
- the ethernet addresses to wake uphost
- the host, the magic sequence will be send toport
- the port numberIOException
- if an I/O error occursprotected static byte[] createWakeupFrame(EthernetAddress ethernetAddress)
ethernetAddress
- the ethernet address