Code example for UnknownHostException

Methods: printStackTrace

0
		try { 
			src_ip = InetAddress.getByAddress(Arrays.copyOfRange(packetContents,14+12,14+16));
			dst_ip= InetAddress.getByAddress(Arrays.copyOfRange(packetContents,14+16,14+20));
		} catch (UnknownHostException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} 
    } 
 
	public InetAddress getSrc_ip() {
		return src_ip;
	} 
 
	public void setSrc_ip(InetAddress src_ip) {
		this.src_ip = src_ip;
	} 
 
	public InetAddress getDst_ip() {
		return dst_ip;
	}