Package org.apache.activemq.protobuf

Examples of org.apache.activemq.protobuf.UTF8Buffer


   * Like {@link #escapeBytes(Buffer)}, but escapes a text string.
   * Non-ASCII characters are first encoded as UTF-8, then each byte is escaped
   * individually as a 3-digit octal escape.  Yes, it's weird.
   */
  static String escapeText(String input) {
    return escapeBytes(new UTF8Buffer(input));
  }
View Full Code Here


  /**
   * Un-escape a text string as escaped using {@link #escapeText(String)}.
   * Two-digit hex escapes (starting with "\x") are also recognized.
   */
  static String unescapeText(String input) throws InvalidEscapeSequence {
    return new UTF8Buffer(unescapeBytes(input)).toString();
  }
View Full Code Here

    /**
     * If the next token is a string, consume it and return its (unescaped)
     * value.  Otherwise, throw a {@link ParseException}.
     */
    public String consumeString() throws ParseException {
      return new UTF8Buffer(consumeBuffer()).toString();
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.protobuf.UTF8Buffer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.