java.lang.StringBuffer.appendCodePoint()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(153)

本文整理了Java中java.lang.StringBuffer.appendCodePoint()方法的一些代码示例,展示了StringBuffer.appendCodePoint()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StringBuffer.appendCodePoint()方法的具体详情如下:
包路径:java.lang.StringBuffer
类名称:StringBuffer
方法名:appendCodePoint

StringBuffer.appendCodePoint介绍

暂无

代码示例

代码示例来源:origin: goldmansachs/gs-collections

((StringBuffer) appendable).appendCodePoint(codePoint);

代码示例来源:origin: wildfly/wildfly

b1 = buffer[i++];
  c = ((b0 & 3) << 4) | ((b1 & 0xf0) >>> 4);
  sb.appendCodePoint(PICKETBOX_COMPATIBILITY.encode(c));
case 1:
  b2 = buffer[i++];
  c = ((b1 & 0xf) << 2) | ((b2 & 0xc0) >>> 6);
  sb.appendCodePoint(PICKETBOX_COMPATIBILITY.encode(c));
  c = b2 & 0x3f;
  sb.appendCodePoint(PICKETBOX_COMPATIBILITY.encode(c));
  break;
b2 = buffer[pos++];
c = (b0 & 0xfc) >>> 2;
sb.appendCodePoint(PICKETBOX_COMPATIBILITY.encode(c));
c = ((b0 & 3) << 4) | ((b1 & 0xf0) >>> 4);
sb.appendCodePoint(PICKETBOX_COMPATIBILITY.encode(c));
c = ((b1 & 0xf) << 2) | ((b2 & 0xc0) >>> 6);
sb.appendCodePoint(PICKETBOX_COMPATIBILITY.encode(c));
c = b2 & 0x3f;
sb.appendCodePoint(PICKETBOX_COMPATIBILITY.encode(c));

代码示例来源:origin: eclipse/eclipse-collections

((StringBuffer) appendable).appendCodePoint(codePoint);

代码示例来源:origin: eclipse/eclipse-collections

((StringBuffer) appendable).appendCodePoint(codePoint);

代码示例来源:origin: goldmansachs/gs-collections

((StringBuffer) appendable).appendCodePoint(codePoint);

代码示例来源:origin: eclipse/eclipse-collections

((StringBuffer) appendable).appendCodePoint(codePoint);

代码示例来源:origin: eclipse/eclipse-collections

((StringBuffer) appendable).appendCodePoint(codePoint);

代码示例来源:origin: jline/jline

/**
 * Possible states in which the current readline operation may be in.
 */
private static enum State {
  /**
   * The user is just typing away
   */
  NORMAL,
  /**
   * In the middle of a emacs seach
   */
  SEARCH,
  FORWARD_SEARCH,
  /**
   * VI "yank-to" operation ("y" during move mode)
   */
  VI_YANK_TO,
  /**
   * VI "delete-to" operation ("d" during move mode)
   */
  VI_DELETE_TO,
  /**
   * VI "change-to" operation ("c" during move mode)
   */
  VI_CHANGE_TO
}

代码示例来源:origin: org.opencypher/grammar

@Override
  public Output appendCodePoint( int codePoint )
  {
    output.appendCodePoint( codePoint );
    return this;
  }
}

代码示例来源:origin: gravel-st/gravel

public static String newInstance_(Object receiver, int size) {
  final StringBuffer stringBuffer = new StringBuffer(size);
  for (int i = 0; i < size; i++) {
    stringBuffer.appendCodePoint(0);
  }
  return stringBuffer.toString();
}

代码示例来源:origin: nschlimm/playground

public static void main(String[] args) throws FileNotFoundException {
    StringBuffer buf = new StringBuffer();
    buf.appendCodePoint(0x1D11E);
    buf.appendCodePoint(0x1D160);
    buf.appendCodePoint(0x1D160);
    buf.appendCodePoint(0x1D160);
    PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream("music.html"), Charset.forName("UTF_32BE")));
    out.println(buf);
    out.close();
  }
}

代码示例来源:origin: net.kieker-monitoring/kieker

@SuppressWarnings("synthetic-access")
@Override
public synchronized void write(final int data) throws IOException { // NOPMD (method level synchronization)
  this.stringBuffer.appendCodePoint(data);
  if (this.stringBuffer.lastIndexOf(this.lineSeperator) != -1) {
    FinalStep.this.logArea.append(this.stringBuffer.toString());
    this.stringBuffer.setLength(0);
  }
}

代码示例来源:origin: kieker-monitoring/kieker

@SuppressWarnings("synthetic-access")
@Override
public synchronized void write(final int data) throws IOException { // NOPMD (method level synchronization)
  this.stringBuffer.appendCodePoint(data);
  if (this.stringBuffer.lastIndexOf(this.lineSeperator) != -1) {
    FinalStep.this.logArea.append(this.stringBuffer.toString());
    this.stringBuffer.setLength(0);
  }
}

代码示例来源:origin: oimchat/oim-fx

public static String emojiCode(String text) {
  StringBuffer sb = new StringBuffer();
  for (int i = 0; i < text.length(); i++) {
    int ch = text.codePointAt(i);
    if (ch <= 128) {
      sb.appendCodePoint(ch);
    } else if (ch > 128 && (ch < 159 || (ch >= 55296 && ch <= 57343))) {
      continue;
    } else {
      sb.append("0x" + Integer.toHexString(ch) + "");
    }
  }
  return sb.toString();
}

代码示例来源:origin: stackoverflow.com

String s = "aaa\\u2022bbb\\u2014ccc";
 StringBuffer buf = new StringBuffer();
 Matcher m = Pattern.compile("\\\\u([0-9A-Fa-f]{4})").matcher(s);
 while (m.find()) {
   try {
     int cp = Integer.parseInt(m.group(1), 16);
     m.appendReplacement(buf, "");
     buf.appendCodePoint(cp);
   } catch (NumberFormatException e) {
   }
 }
 m.appendTail(buf);
 s = buf.toString();

代码示例来源:origin: castorini/Anserini

private static String undoMqlKeyEscape(String s) {
 String[] part = s.split("\\$");
 StringBuffer sb = new StringBuffer(part[0]);
 for (int i = 1; i<part.length; i++) {
  try {
   int code = Integer.parseInt(part[i].substring(0, 4), 16);
   sb.appendCodePoint(code).append(part[i].substring(4));
  } catch (IndexOutOfBoundsException e) {
   sb.append(part[i]);
  } catch (NumberFormatException e) {
   sb.append(part[i]);
  }
 }
 return sb.toString();
}

代码示例来源:origin: org.apache.sis.core/sis-metadata

/**
 * Closes the element opened by {@link #openElement(boolean, String)}.
 *
 * @param  newLine  {@code true} for invoking {@link #newLine()} last.
 */
private void closeElement(final boolean newLine) {
  buffer.appendCodePoint(symbols.getClosingBracket(0));
  if (newLine) {
    newLine();
  }
}

代码示例来源:origin: apache/sis

/**
 * Closes the element opened by {@link #openElement(boolean, String)}.
 *
 * @param  newLine  {@code true} for invoking {@link #newLine()} last.
 */
private void closeElement(final boolean newLine) {
  buffer.appendCodePoint(symbols.getClosingBracket(0));
  if (newLine) {
    newLine();
  }
}

代码示例来源:origin: apache/sis

/**
 * Appends a separator if needed, then opens a new element.
 *
 * @param  newLine  {@code true} for invoking {@link #newLine()} first.
 * @param  keyword  the element keyword (e.g. {@code "DATUM"}, {@code "AXIS"}, <i>etc</i>).
 */
private void openElement(final boolean newLine, String keyword) {
  if (newLine && buffer.length() != elementStart) {
    newLine();
  }
  appendSeparator();
  if (toUpperCase != 0) {
    final Locale locale = symbols.getLocale();
    keyword = (toUpperCase >= 0) ? keyword.toUpperCase(locale) : keyword.toLowerCase(locale);
  }
  elementStart = buffer.append(keyword).appendCodePoint(symbols.getOpeningBracket(0)).length();
}

代码示例来源:origin: org.apache.sis.core/sis-metadata

/**
 * Appends a separator if needed, then opens a new element.
 *
 * @param  newLine  {@code true} for invoking {@link #newLine()} first.
 * @param  keyword  the element keyword (e.g. {@code "DATUM"}, {@code "AXIS"}, <i>etc</i>).
 */
private void openElement(final boolean newLine, String keyword) {
  if (newLine && buffer.length() != elementStart) {
    newLine();
  }
  appendSeparator();
  if (toUpperCase != 0) {
    final Locale locale = symbols.getLocale();
    keyword = (toUpperCase >= 0) ? keyword.toUpperCase(locale) : keyword.toLowerCase(locale);
  }
  elementStart = buffer.append(keyword).appendCodePoint(symbols.getOpeningBracket(0)).length();
}

相关文章