src/com/shrewdify/diaroser/utils/ElementParser.java
public InetAddress bytesToAddress(byte[] rawData) throws UnknownHostException {
		InetAddress inetAddress;
		byte[] address;
		if (rawData[INT_INET4] == INT_INET4) {
			address = new byte[4];
			System.arraycopy(rawData, 2, address, 0, address.length);
			inetAddress = Inet4Address.getByAddress(address);
		} else {
			address = new byte[16];
			System.arraycopy(rawData, 2, address, 0, address.length);
			inetAddress = Inet6Address.getByAddress(address);
		}
		return inetAddress;
	}
/**
	 * 
	 * @param rawData
	 * @return
	 * @throws UnknownHostException
	 * 
	 * Converts the Bytes Correspondingly to IPV4 or IPV6 address.
	 */
@param rawData
@return
@throws UnknownHostException

Converts the Bytes Correspondingly to IPV4 or IPV6 address.
@param rawData @return @throws UnknownHostException Converts the Bytes Correspondingly to IPV4 or IPV6 address .
public InetAddress bytesToAddress(byte[] rawData) throws UnknownHostException {
		InetAddress inetAddress;
		byte[] address;
		if (rawData[INT_INET4] == INT_INET4) {
			address = new byte[4];
			System.arraycopy(rawData, 2, address, 0, address.length);
			inetAddress = Inet4Address.getByAddress(address);
		} else {
			address = new byte[16];
			System.arraycopy(rawData, 2, address, 0, address.length);
			inetAddress = Inet6Address.getByAddress(address);
		}
		return inetAddress;
	}
public InetAddress bytesToAddress ( byte [ ] rawData ) throws UnknownHostException { InetAddress inetAddress ; byte [ ] address ; if ( rawData [ INT_INET4 ] == INT_INET4 ) { address = new byte [ 4 ] ; System . arraycopy ( rawData , 2 , address , 0 , address . length ) ; inetAddress = Inet4Address . getByAddress ( address ) ; } else { address = new byte [ 16 ] ; System . arraycopy ( rawData , 2 , address , 0 , address . length ) ; inetAddress = Inet6Address . getByAddress ( address ) ; } return inetAddress ; }
@param rawData
 @return
 @throws UnknownHostException
@param rawData @return @throws UnknownHostException