com.jeffpalm.util
Class Net

java.lang.Object
  extended by com.jeffpalm.util.Net

public final class Net
extends java.lang.Object


Nested Class Summary
static interface Net.ConnectionOpenner
           
static interface Net.URLReaderThings
           
 
Method Summary
static void doneParsing()
           
static java.lang.String hostFromIP(java.lang.String ip)
           
static java.lang.String hostIfIP_ipIfHost(java.lang.String str)
           
static java.lang.String hostname(java.lang.String ip)
           
static java.net.InetAddress inetAddressFromHost(java.lang.String host)
           
static java.net.InetAddress inetAddressFromIP(java.lang.String ip)
           
static java.lang.String ipFromHost(java.lang.String host)
           
static boolean isHost(java.lang.String str)
           
static boolean isIP(java.lang.String str)
           
static boolean isProbablyHost(java.lang.String str)
           
static java.lang.String justHost(java.lang.String url)
           
static void load()
           
static Net.URLReaderThings open(java.lang.String urlStr)
           
static Net.URLReaderThings open(java.net.URL url)
           
static void parse(javax.swing.text.html.HTMLEditorKit.ParserCallback callback, java.net.URL url)
           
static void parse(javax.swing.text.html.HTMLEditorKit.ParserCallback callback, java.net.URL url, Net.ConnectionOpenner openner)
           
static void parse(javax.swing.text.html.HTMLEditorKit.ParserCallback callback, java.net.URL url, Net.ConnectionOpenner openner, java.lang.String userAgent)
           
static void parse(javax.swing.text.html.HTMLEditorKit.ParserCallback callback, java.net.URL url, java.lang.String userAgent)
           
static void save()
           
static byte[] stringToBytes(java.lang.String ip)
           
static java.net.URL url(java.lang.String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

url

public static java.net.URL url(java.lang.String url)

stringToBytes

public static byte[] stringToBytes(java.lang.String ip)

load

public static void load()

save

public static void save()

hostname

public static java.lang.String hostname(java.lang.String ip)
                                 throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

inetAddressFromHost

public static java.net.InetAddress inetAddressFromHost(java.lang.String host)
                                                throws java.lang.Exception
Throws:
java.lang.Exception

inetAddressFromIP

public static java.net.InetAddress inetAddressFromIP(java.lang.String ip)
                                              throws java.lang.Exception
Throws:
java.lang.Exception

hostIfIP_ipIfHost

public static java.lang.String hostIfIP_ipIfHost(java.lang.String str)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

hostFromIP

public static java.lang.String hostFromIP(java.lang.String ip)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

ipFromHost

public static java.lang.String ipFromHost(java.lang.String host)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

isHost

public static boolean isHost(java.lang.String str)

isProbablyHost

public static boolean isProbablyHost(java.lang.String str)

isIP

public static boolean isIP(java.lang.String str)

doneParsing

public static void doneParsing()

parse

public static void parse(javax.swing.text.html.HTMLEditorKit.ParserCallback callback,
                         java.net.URL url,
                         Net.ConnectionOpenner openner,
                         java.lang.String userAgent)
                  throws java.lang.Exception
Throws:
java.lang.Exception

parse

public static void parse(javax.swing.text.html.HTMLEditorKit.ParserCallback callback,
                         java.net.URL url,
                         java.lang.String userAgent)
                  throws java.lang.Exception
Throws:
java.lang.Exception

parse

public static void parse(javax.swing.text.html.HTMLEditorKit.ParserCallback callback,
                         java.net.URL url,
                         Net.ConnectionOpenner openner)
                  throws java.lang.Exception
Throws:
java.lang.Exception

parse

public static void parse(javax.swing.text.html.HTMLEditorKit.ParserCallback callback,
                         java.net.URL url)
                  throws java.lang.Exception
Throws:
java.lang.Exception

justHost

public static java.lang.String justHost(java.lang.String url)
                                 throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

open

public static Net.URLReaderThings open(java.lang.String urlStr)
                                throws java.lang.Exception
Throws:
java.lang.Exception

open

public static Net.URLReaderThings open(java.net.URL url)
                                throws java.lang.Exception
Throws:
java.lang.Exception