Here you can find the source of getIPv4StringByStrippingIPv6Prefix(String in)
public static String getIPv4StringByStrippingIPv6Prefix(String in)
//package com.java2s; public class Main { public static String getIPv4StringByStrippingIPv6Prefix(String in) { String ipv6Prefix = "::ffff:"; if (in.startsWith(ipv6Prefix)) { return in.substring(ipv6Prefix.length(), in.length()); }// ww w . j a v a 2s .c om return in; } }