congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
FastXmlSerializer.append
Code IndexAdd Tabnine to your IDE (free)

How to use
append
method
in
com.lody.virtual.helper.utils.FastXmlSerializer

Best Java code snippets using com.lody.virtual.helper.utils.FastXmlSerializer.append (Showing top 20 results out of 315)

origin: android-hacker/VirtualXposed

private void escapeAndAppendString(char[] buf, int start, int len) throws IOException {
  final char NE = (char)ESCAPE_TABLE.length;
  final String[] escapes = ESCAPE_TABLE;
  int end = start+len;
  int lastPos = start;
  int pos;
  for (pos=start; pos<end; pos++) {
    char c = buf[pos];
    if (c >= NE) continue;
    String escape = escapes[c];
    if (escape == null) continue;
    if (lastPos < pos) append(buf, lastPos, pos-lastPos);
    lastPos = pos + 1;
    append(escape);
  }
  if (lastPos < pos) append(buf, lastPos, pos-lastPos);
}
origin: android-hacker/VirtualXposed

public XmlSerializer startTag(String namespace, String name) throws IOException,
    IllegalArgumentException, IllegalStateException {
  if (mInTag) {
    append(">\n");
  }
  if (mIndent) {
    appendIndent(mNesting);
  }
  mNesting++;
  append('<');
  if (namespace != null) {
    append(namespace);
    append(':');
  }
  append(name);
  mInTag = true;
  mLineStart = false;
  return this;
}
origin: android-hacker/VirtualXposed

public XmlSerializer attribute(String namespace, String name, String value) throws IOException,
    IllegalArgumentException, IllegalStateException {
  append(' ');
  if (namespace != null) {
    append(namespace);
    append(':');
  }
  append(name);
  append("=\"");
  escapeAndAppendString(value);
  append('"');
  mLineStart = false;
  return this;
}
origin: android-hacker/VirtualXposed

public XmlSerializer endTag(String namespace, String name) throws IOException,
    IllegalArgumentException, IllegalStateException {
  mNesting--;
  if (mInTag) {
    append(" />\n");
  } else {
    if (mIndent && mLineStart) {
      appendIndent(mNesting);
    }
    append("</");
    if (namespace != null) {
      append(namespace);
      append(':');
    }
    append(name);
    append(">\n");
  }
  mLineStart = true;
  mInTag = false;
  return this;
}
origin: android-hacker/VirtualXposed

private void append(String str) throws IOException {
  append(str, 0, str.length());
}
origin: android-hacker/VirtualXposed

private void escapeAndAppendString(final String string) throws IOException {
  final int N = string.length();
  final char NE = (char)ESCAPE_TABLE.length;
  final String[] escapes = ESCAPE_TABLE;
  int lastPos = 0;
  int pos;
  for (pos=0; pos<N; pos++) {
    char c = string.charAt(pos);
    if (c >= NE) continue;
    String escape = escapes[c];
    if (escape == null) continue;
    if (lastPos < pos) append(string, lastPos, pos-lastPos);
    lastPos = pos + 1;
    append(escape);
  }
  if (lastPos < pos) append(string, lastPos, pos-lastPos);
}
origin: android-hacker/VirtualXposed

private void appendIndent(int indent) throws IOException {
  indent *= 4;
  if (indent > sSpace.length()) {
    indent = sSpace.length();
  }
  append(sSpace, 0, indent);
}
origin: android-hacker/VirtualXposed

public XmlSerializer text(String text) throws IOException, IllegalArgumentException,
    IllegalStateException {
  if (mInTag) {
    append(">");
    mInTag = false;
  }
  escapeAndAppendString(text);
  if (mIndent) {
    mLineStart = text.length() > 0 && (text.charAt(text.length()-1) == '\n');
  }
  return this;
}
origin: android-hacker/VirtualXposed

public XmlSerializer text(char[] buf, int start, int len) throws IOException,
    IllegalArgumentException, IllegalStateException {
  if (mInTag) {
    append(">");
    mInTag = false;
  }
  escapeAndAppendString(buf, start, len);
  if (mIndent) {
    mLineStart = buf[start+len-1] == '\n';
  }
  return this;
}
origin: android-hacker/VirtualXposed

private void append(String str, int i, final int length) throws IOException {
  if (length > BUFFER_LEN) {
    final int end = i + length;
    while (i < end) {
      int next = i + BUFFER_LEN;
      append(str, i, next<end ? BUFFER_LEN : (end-i));
      i = next;
    }
    return;
  }
  int pos = mPos;
  if ((pos+length) > BUFFER_LEN) {
    flush();
    pos = mPos;
  }
  str.getChars(i, i+length, mText, pos);
  mPos = pos + length;
}
origin: android-hacker/VirtualXposed

private void append(char[] buf, int i, final int length) throws IOException {
  if (length > BUFFER_LEN) {
    final int end = i + length;
    while (i < end) {
      int next = i + BUFFER_LEN;
      append(buf, i, next<end ? BUFFER_LEN : (end-i));
      i = next;
    }
    return;
  }
  int pos = mPos;
  if ((pos+length) > BUFFER_LEN) {
    flush();
    pos = mPos;
  }
  System.arraycopy(buf, i, mText, pos, length);
  mPos = pos + length;
}
origin: darkskygit/VirtualApp

public XmlSerializer attribute(String namespace, String name, String value) throws IOException,
    IllegalArgumentException, IllegalStateException {
  append(' ');
  if (namespace != null) {
    append(namespace);
    append(':');
  }
  append(name);
  append("=\"");
  escapeAndAppendString(value);
  append('"');
  mLineStart = false;
  return this;
}
origin: bzsome/VirtualApp-x326

public XmlSerializer attribute(String namespace, String name, String value) throws IOException,
    IllegalArgumentException, IllegalStateException {
  append(' ');
  if (namespace != null) {
    append(namespace);
    append(':');
  }
  append(name);
  append("=\"");
  escapeAndAppendString(value);
  append('"');
  mLineStart = false;
  return this;
}
origin: bzsome/VirtualApp-x326

private void appendIndent(int indent) throws IOException {
  indent *= 4;
  if (indent > sSpace.length()) {
    indent = sSpace.length();
  }
  append(sSpace, 0, indent);
}
origin: darkskygit/VirtualApp

private void append(String str) throws IOException {
  append(str, 0, str.length());
}
origin: darkskygit/VirtualApp

private void appendIndent(int indent) throws IOException {
  indent *= 4;
  if (indent > sSpace.length()) {
    indent = sSpace.length();
  }
  append(sSpace, 0, indent);
}
origin: darkskygit/VirtualApp

public XmlSerializer text(char[] buf, int start, int len) throws IOException,
    IllegalArgumentException, IllegalStateException {
  if (mInTag) {
    append(">");
    mInTag = false;
  }
  escapeAndAppendString(buf, start, len);
  if (mIndent) {
    mLineStart = buf[start+len-1] == '\n';
  }
  return this;
}
origin: darkskygit/VirtualApp

public XmlSerializer text(String text) throws IOException, IllegalArgumentException,
    IllegalStateException {
  if (mInTag) {
    append(">");
    mInTag = false;
  }
  escapeAndAppendString(text);
  if (mIndent) {
    mLineStart = text.length() > 0 && (text.charAt(text.length()-1) == '\n');
  }
  return this;
}
origin: bzsome/VirtualApp-x326

public XmlSerializer text(String text) throws IOException, IllegalArgumentException,
    IllegalStateException {
  if (mInTag) {
    append(">");
    mInTag = false;
  }
  escapeAndAppendString(text);
  if (mIndent) {
    mLineStart = text.length() > 0 && (text.charAt(text.length()-1) == '\n');
  }
  return this;
}
origin: bzsome/VirtualApp-x326

public XmlSerializer text(char[] buf, int start, int len) throws IOException,
    IllegalArgumentException, IllegalStateException {
  if (mInTag) {
    append(">");
    mInTag = false;
  }
  escapeAndAppendString(buf, start, len);
  if (mIndent) {
    mLineStart = buf[start+len-1] == '\n';
  }
  return this;
}
com.lody.virtual.helper.utilsFastXmlSerializerappend

Popular methods of FastXmlSerializer

  • <init>
  • appendIndent
  • escapeAndAppendString
  • flush
  • flushBytes

Popular in Java

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • onRequestPermissionsResult (Fragment)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • JOptionPane (javax.swing)
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now