gnu.x11
Class XAuthority

java.lang.Object
  extended by gnu.x11.XAuthority

public class XAuthority
extends java.lang.Object

A utility class to work with Xauthority files. This is reverse engineered by looking at one .Xauthority file.

Author:
Roman Kennke (kennke@aicas.com)

Field Summary
 java.lang.String display
          The display number.
 java.lang.String hostname
          The hostname for the entry.
 byte[] ip_address
          The IP address for the entry.
 byte[] protocol_data
          The actual protocol data.
 byte[] protocol_name
          The protocol name.
 int type
          The type.
static int TYPE_UNIX_HOSTNAME
           
static int TYPE_UNIX_IP_ADDRESS
           
 
Method Summary
static XAuthority[] get_authorities()
          Fetches the current Xauthority entries from $HOME/.Xauthority or whatever is specified in the environment variable $XAUTHORITY.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_UNIX_IP_ADDRESS

public static final int TYPE_UNIX_IP_ADDRESS
See Also:
Constant Field Values

TYPE_UNIX_HOSTNAME

public static final int TYPE_UNIX_HOSTNAME
See Also:
Constant Field Values

type

public int type
The type. Known types are


hostname

public java.lang.String hostname
The hostname for the entry. This may be null, in which case you may want to look at the ip_address entry.


ip_address

public byte[] ip_address
The IP address for the entry. This may be null, in which case you may want to look at the hostname entry.


display

public java.lang.String display
The display number.


protocol_name

public byte[] protocol_name
The protocol name.


protocol_data

public byte[] protocol_data
The actual protocol data.

Method Detail

get_authorities

public static XAuthority[] get_authorities()
Fetches the current Xauthority entries from $HOME/.Xauthority or whatever is specified in the environment variable $XAUTHORITY.

Returns:
the current Xauthority entries

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object