public static InetAddress readInetAddress(DataInput in) throws IOException {

    byte[] address = readByteArray(in);
    if (address == null) {
      return null;
    }

    try {
      // note: this does not throw UnknownHostException at this time
      return InetAddress.getByAddress(address);
    } catch (UnknownHostException ex) {
      throw new IOException("While reading an InetAddress", ex);
    }

  }
Reads an instance of <code>String</code> from a <code>DataInput</code>. The return value may be
<code>null</code>.

@throws IOException A problem occurs while reading from <code>in</code>

@see #writeString
geode-serialization/src/main/java/org/apache/geode/internal/serialization/StaticSerialization.java