class ValueMetaInternetAddress extends ValueMetaDate {

  @Override
  public byte[] getBinaryString( Object object ) throws HopValueException {
    if ( isStorageBinaryString() && identicalFormat ) {
      return (byte[]) object; // shortcut it directly for better performance.
    }
    if ( object == null ) {
      return null;
    }
    switch ( storageType ) {
      case STORAGE_TYPE_NORMAL:
        return convertStringToBinaryString( getString( object ) );
      case STORAGE_TYPE_BINARY_STRING:
        return convertStringToBinaryString( getString(
          convertStringToInternetAddress( convertBinaryStringToString( (byte[]) object ) ) ) );
      case STORAGE_TYPE_INDEXED:
        return convertStringToBinaryString(
          convertInternetAddressToString( (InetAddress) index[ ( (Integer) object ) ] ) );
      default:
        throw new HopValueException( toString() + " : Unknown storage type " + storageType + " specified." );
    }
  }

  public  ValueMetaInternetAddress();
  public  ValueMetaInternetAddress( String name );

}