@Override
  public void write(final DataOutputView out) throws IOException {
    out.writeInt(this.inetAddress.getAddress().length);
    out.write(this.inetAddress.getAddress());

    out.writeInt(this.dataPort);

    StringUtils.writeNullableString(fqdnHostName, out);
    StringUtils.writeNullableString(hostName, out);
  }
Ejemplo n.º 2
0
  @Override
  public void write(DataOutputView out) throws IOException {

    if (uri == null) {
      out.writeBoolean(false);
    } else {
      out.writeBoolean(true);
      StringUtils.writeNullableString(uri.getScheme(), out);
      StringUtils.writeNullableString(uri.getUserInfo(), out);
      StringUtils.writeNullableString(uri.getHost(), out);
      out.writeInt(uri.getPort());
      StringUtils.writeNullableString(uri.getPath(), out);
      StringUtils.writeNullableString(uri.getQuery(), out);
      StringUtils.writeNullableString(uri.getFragment(), out);
    }
  }