Results 1 to 2 of 2
  1. #1
    tiasen24 is offline Member
    Join Date
    May 2011
    Posts
    1
    Rep Power
    0

    Default Check if an IP is IPV6

    What is the best way to check if an IP is IPV4 or IPV6 through java code?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,436
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by tiasen24 View Post
    What is the best way to check if an IP is IPV4 or IPV6 through java code?
    Java Code:
    InetAddress ia= ...
    if (ia instanceof Inet6Address) ...
    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Can someone check this over?
    By Phyxed in forum New To Java
    Replies: 2
    Last Post: 03-29-2011, 09:07 AM
  2. Don't know what to check for
    By Chasingxsuns in forum New To Java
    Replies: 8
    Last Post: 08-26-2009, 05:59 AM
  3. hi (no need to check-spam-)
    By soheil in forum Java Software
    Replies: 2
    Last Post: 08-02-2009, 05:09 PM
  4. pls check it
    By aRTx in forum New To Java
    Replies: 0
    Last Post: 03-24-2009, 02:35 PM
  5. Check box tag
    By elizaabru in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 08-26-2008, 02:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •