Android Open Source - sdl_tester_android Ip Address

From Project

Back to project page sdl_tester_android.


The source code is released under:

Copyright (c) 2014, Ford Motor Company All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are m...

If you think the Android project sdl_tester_android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.livio.sdl;
//from  ww  w.java2
 * Represents an IP address and port number as 2 strings - one string for the address
 * itself and another string for the associated TCP port number.
 * @author Mike Burke
public class IpAddress {

  private String ipAddress, tcpPort;
  public IpAddress(String ipAddress, String tcpPort) {
    this.ipAddress = ipAddress;
    this.tcpPort = tcpPort;
  public IpAddress(String ipAddress, int tcpPort){
    this(ipAddress, String.valueOf(tcpPort));

  public String getIpAddress() {
    return ipAddress;

  public String getTcpPort() {
    return tcpPort;
  public String toString(){
    return new StringBuilder().append(ipAddress).append(":").append(tcpPort).toString();


Java Source Code List