public String encode(){
  String encoded_string;
  encoded_string=MEDIA_FIELD;
  if (media != null)   encoded_string+=media.toLowerCase() + Separators.SP + port;
  if (nports > 1)   encoded_string+=Separators.SLASH + nports;
  if (proto != null)   encoded_string+=Separators.SP + proto;
  if (formats != null)   encoded_string+=Separators.SP + encodeFormats();
  encoded_string+=Separators.NEWLINE;
  return encoded_string;
}

public String encode ( ) { String encoded_string ; encoded_string = MEDIA_FIELD ; if ( media != null ) encoded_string += media . toLowerCase ( ) + Separators . SP + port ; if ( nports > 1 ) encoded_string += Separators . SLASH + nports ; if ( proto != null ) encoded_string += Separators . SP + proto ; if ( formats != null ) encoded_string += Separators . SP + encodeFormats ( ) ; encoded_string += Separators . NEWLINE ; return encoded_string ; }
get the string encoded version of this object
