src/main/java/pityoulish/sockets/server/TLVResponseBuilderImpl.java
protected void appendString(MsgBoardTLV parent,
                              MsgBoardType txttype,
                              String text,
                              boolean utf8)
  {
    if (parent == null)
       throw new NullPointerException("MsgBoardTLV");
    if (txttype == null)
       throw new NullPointerException("txttype");
    if (text == null)
       text = "";

    MsgBoardTLV content = parent.appendTLV(txttype);
    content.setTextValue(text, utf8 ? "UTF-8" : "US-ASCII");
    parent.addToLength(content.getSize());
  }
/**
   * Appends a TLV-encoded string to the content of a TLV.
   *
   * @param parent      the TLV to append to
   * @param txttype     type of the TLV to append
   * @param text        the string to put into the nested TLV.
   *                    <code>null</code> is treated as an empty string
   * @param utf8        <code>true</code> for UTF-8 encoding,
   *                    <code>false</code> for US-ASCII
   */
Appends a TLV-encoded string to the content of a TLV.
@param parent      the TLV to append to
@param txttype     type of the TLV to append
@param text        the string to put into the nested TLV.
null is treated as an empty string
@param utf8        true for UTF-8 encoding,
false for US-ASCII
Appends a TLV - encoded string to the content of a TLV . @param parent the TLV to append to @param txttype type of the TLV to append @param text the string to put into the nested TLV . null is treated as an empty string @param utf8 true for UTF - 8 encoding false for US - ASCII
protected void appendString(MsgBoardTLV parent,
                              MsgBoardType txttype,
                              String text,
                              boolean utf8)
  {
    if (parent == null)
       throw new NullPointerException("MsgBoardTLV");
    if (txttype == null)
       throw new NullPointerException("txttype");
    if (text == null)
       text = "";
    MsgBoardTLV content = parent.appendTLV(txttype);
    content.setTextValue(text, utf8 ? "UTF-8" : "US-ASCII");
    parent.addToLength(content.getSize());
  }
protected void appendString ( MsgBoardTLV parent , MsgBoardType txttype , String text , boolean utf8 ) { if ( parent == null ) throw new NullPointerException ( "MsgBoardTLV" ) ; if ( txttype == null ) throw new NullPointerException ( "txttype" ) ; if ( text == null ) text = "" ; MsgBoardTLV content = parent . appendTLV ( txttype ) ; content . setTextValue ( text , utf8 ? "UTF-8" : "US-ASCII" ) ; parent . addToLength ( content . getSize ( ) ) ; }
Appends a TLV-encoded string to the content of a TLV.
Appends a TLV - encoded string to the content of a TLV .