Java Hex String Create appendHexEntity(final StringBuilder out, final char value)

Here you can find the source of appendHexEntity(final StringBuilder out, final char value)

Description

Append the given char as a hexadecimal HTML entity.

License

Apache License

Parameter

Parameter Description
out The StringBuilder to write to.
value The character.

Declaration

public final static void appendHexEntity(final StringBuilder out, final char value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/*from   w  w  w .j a  v  a 2s . c om*/
     * Append the given char as a hexadecimal HTML entity.
     * 
     * @param out The StringBuilder to write to.
     * @param value The character.
     */
    public final static void appendHexEntity(final StringBuilder out, final char value) {
        out.append("&#x");
        out.append(Integer.toHexString(value));
        out.append(';');
    }
}

Related

  1. appendHex(StringBuilder builder, int b)
  2. appendHexByte(byte b, StringBuffer buf)
  3. appendHexByte(final StringBuilder sb, final byte b)
  4. appendHexBytes(StringBuilder builder, byte[] bytes)
  5. appendHexDumpRowPrefix(StringBuilder dump, int row, int rowStartIndex)
  6. appendHexEscape(StringBuilder out, int codePoint)
  7. appendHexJavaScriptRepresentation(StringBuilder sb, char c)
  8. appendHexNumber(StringBuffer target, byte b)
  9. appendHexPair(byte b, StringBuffer sb)