package org.ovirt.engine.core.utils;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class IPAddress {

    private byte[] ip;

    public IPAddress(byte[] ipAddr) {
        ip = ipAddr;
    }

    public byte[] GetAddressBytes() {
        return ip;
    }

    public static IPAddress Parse(String ipString) {
        try {
            return new IPAddress(InetAddress.getByName(ipString).getAddress());
        } catch (UnknownHostException ex) {
            RuntimeException newEx = new RuntimeException(ex.getMessage());
            newEx.setStackTrace(ex.getStackTrace());
            throw newEx;
        }
    }

    @Override
    public String toString() {
        if (ip == null) {
            return "";
        }
        try {
            return InetAddress.getByAddress(ip).getHostAddress();
        } catch (UnknownHostException ex) {
            RuntimeException newEx = new RuntimeException(ex.getMessage());
            newEx.setStackTrace(ex.getStackTrace());
            throw newEx;
        }
    }

}

@@ -219,434 +219,8 @@
  %7D%0A%0A
-    public byte%5B%5D GetAddressBytes() %7B%0A        return ip;%0A    %7D%0A%0A    public static IPAddress Parse(String ipString) %7B%0A        try %7B%0A            return new IPAddress(InetAddress.getByName(ipString).getAddress());%0A        %7D catch (UnknownHostException ex) %7B%0A            RuntimeException newEx = new RuntimeException(ex.getMessage());%0A            newEx.setStackTrace(ex.getStackTrace());%0A            throw newEx;%0A        %7D%0A    %7D%0A%0A
     

remove unused methods in IPAddress