public class WakeUpUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.net.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,
java.net.InetAddress host)
Wakes up the machines with provided ethernet address.
|
static void |
wakeup(EthernetAddress[] ethernetAddresses,
java.net.InetAddress host,
int port)
Wakes up the machines with provided ethernet addresses.
|
static void |
wakeup(EthernetAddress ethernetAddress,
java.net.InetAddress host)
Wakes up the machine with the provided ethernet addresses, using the default port.
|
static void |
wakeup(EthernetAddress ethernetAddress,
java.net.InetAddress host,
int port)
Wakes up the machines with provided ethernet address.
|
public static final java.net.InetAddress DEFAULT_HOST
public static final int DEFAULT_PORT
public static void wakeup(EthernetAddress ethernetAddress) throws java.io.IOException
ethernetAddress
- the ethernet address to wake upjava.io.IOException
- if an I/O error occursDEFAULT_HOST
,
DEFAULT_PORT
public static void wakeup(EthernetAddress[] ethernetAddresses) throws java.io.IOException
ethernetAddresses
- the ethernet addresses to wake upjava.io.IOException
- if an I/O error occursDEFAULT_HOST
,
DEFAULT_PORT
public static void wakeup(EthernetAddress ethernetAddress, java.net.InetAddress host) throws java.io.IOException
ethernetAddress
- the ethernet address to wake uphost
- the host, the magic sequence will be send tojava.io.IOException
- if an I/O error occursDEFAULT_PORT
public static void wakeup(EthernetAddress[] ethernetAddresses, java.net.InetAddress host) throws java.io.IOException
WakeUpUtil.wakeup(ethernetAddresses, host, DEFAULT_PORT);
ethernetAddresses
- the ethernet addresses to wake uphost
- the host, the magic sequence will be send tojava.io.IOException
- if an I/O error occursDEFAULT_PORT
public static void wakeup(EthernetAddress ethernetAddress, java.net.InetAddress host, int port) throws java.io.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 numberjava.io.IOException
- if an I/O error occurswakeup(EthernetAddress[], InetAddress, int)
public static void wakeup(EthernetAddress[] ethernetAddresses, java.net.InetAddress host, int port) throws java.io.IOException
ethernetAddresses
- the ethernet addresses to wake uphost
- the host, the magic sequence will be send toport
- the port numberjava.io.IOException
- if an I/O error occursprotected static byte[] createWakeupFrame(EthernetAddress ethernetAddress)
ethernetAddress
- the ethernet address