Tabnine Logo
IndentingWriter.write
Code IndexAdd Tabnine to your IDE (free)

How to use
write
method
in
org.jf.util.IndentingWriter

Best Java code snippets using org.jf.util.IndentingWriter.write (Showing top 20 results out of 315)

origin: sonyxperiadev/ApkAnalyser

@Override
public void write(char[] chars) throws IOException {
  //synchronized(lock) {
    for (char chr: chars) {
      write(chr);
    }
  //}
}
origin: sonyxperiadev/ApkAnalyser

@Override
public void write(char[] chars, int start, int len) throws IOException {
  //synchronized(lock) {
    len = start+len;
    while (start < len) {
      write(chars[start++]);
    }
  //}
}
origin: sonyxperiadev/ApkAnalyser

@Override
public Writer append(char c) throws IOException {
  write(c);
  return this;
}
origin: sonyxperiadev/ApkAnalyser

public void printUnsignedLongAsHex(long value) throws IOException {
  int bufferIndex = 0;
  do {
    int digit = (int)(value & 15);
    if (digit < 10) {
      buffer[bufferIndex++] = (char)(digit + '0');
    } else {
      buffer[bufferIndex++] = (char)((digit - 10) + 'a');
    }
    value >>>= 4;
  } while (value != 0);
  while (bufferIndex>0) {
    write(buffer[--bufferIndex]);
  }
}
origin: JesusFreke/smali

protected boolean writeCommentIfResourceId(IndentingWriter writer, int val) throws IOException {
  Map<Integer,String> resourceIds = methodDef.classDef.options.resourceIds;
  String resource = resourceIds.get(Integer.valueOf(val));
  if (resource != null) {
    writer.write("    # ");
    writer.write(resource);
    return true;
  }
  return false;
}
origin: sonyxperiadev/ApkAnalyser

@Override
public void write(String str, int start, int len) throws IOException {
  //synchronized(lock) {
    len = start+len;
    while (start < len) {
      write(str.charAt(start++));
    }
  //}
}
origin: sonyxperiadev/ApkAnalyser

@Override
public Writer append(CharSequence charSequence) throws IOException {
  write(charSequence.toString());
  return this;
}
origin: JesusFreke/smali

protected void writeCommentIfLikelyDouble(IndentingWriter writer, long val) throws IOException {
  if (NumberUtils.isLikelyDouble(val)) {
    writer.write("    # ");
    double dval = Double.longBitsToDouble(val);
    if (dval == Double.POSITIVE_INFINITY)
      writer.write("Double.POSITIVE_INFINITY");
    else if (dval == Double.NEGATIVE_INFINITY)
      writer.write("Double.NEGATIVE_INFINITY");
    else if (Double.isNaN(dval))
      writer.write("Double.NaN");
    else if (dval == Double.MAX_VALUE)
      writer.write("Double.MAX_VALUE");
    else if (dval == Math.PI)
      writer.write("Math.PI");
    else if (dval == Math.E)
      writer.write("Math.E");
    else
      writer.write(Double.toString(dval));
  }
}
origin: JesusFreke/smali

protected void writeCommentIfLikelyFloat(IndentingWriter writer, int val) throws IOException {
  if (NumberUtils.isLikelyFloat(val)) {
    writer.write("    # ");
    float fval = Float.intBitsToFloat(val);
    if (fval == Float.POSITIVE_INFINITY)
      writer.write("Float.POSITIVE_INFINITY");
    else if (fval == Float.NEGATIVE_INFINITY)
      writer.write("Float.NEGATIVE_INFINITY");
    else if (Float.isNaN(fval))
      writer.write("Float.NaN");
    else if (fval == Float.MAX_VALUE)
      writer.write("Float.MAX_VALUE");
    else if (fval == (float)Math.PI)
      writer.write("(float)Math.PI");
    else if (fval == (float)Math.E)
      writer.write("(float)Math.E");
    else {
      writer.write(Float.toString(fval));
      writer.write('f');
    }
  }
}
origin: sonyxperiadev/ApkAnalyser

@Override
public void write(String s) throws IOException {
  //synchronized (lock) {
    for (int i=0; i<s.length(); i++) {
      write(s.charAt(i));
    }
  //}
}
origin: sonyxperiadev/ApkAnalyser

@Override
public Writer append(CharSequence charSequence, int start, int len) throws IOException {
  write(charSequence.subSequence(start, len).toString());
  return this;
}
origin: JesusFreke/smali

private static void writeAccessFlags(IndentingWriter writer, int accessFlags)
    throws IOException {
  for (AccessFlags accessFlag: AccessFlags.getAccessFlagsForMethod(accessFlags)) {
    writer.write(accessFlag.toString());
    writer.write(' ');
  }
}
origin: JesusFreke/smali

  @Override
  public boolean writeTo(IndentingWriter writer) throws IOException {
    writer.write("#@");
    writer.printUnsignedLongAsHex(codeAddress & 0xFFFFFFFFL);
    return true;
  }
});
origin: JesusFreke/smali

  @Override
  public boolean writeTo(IndentingWriter writer) throws IOException {
    writer.write("#@");
    writer.printUnsignedLongAsHex(codeAddress & 0xFFFFFFFFL);
    return true;
  }
});
origin: JesusFreke/smali

private String writeInvalidItemIndex(InvalidItemIndex ex, int type, IndentingWriter writer)
    throws IOException {
  writer.write("#");
  writer.write(ex.getMessage());
  writer.write("\n");
  return String.format("%s@%d", ReferenceType.toString(type), ex.getInvalidIndex());
}
origin: JesusFreke/smali

protected void writeOpcode(IndentingWriter writer) throws IOException {
  writer.write(instruction.getOpcode().name);
}
origin: JesusFreke/smali

  protected void writeVtableIndex(IndentingWriter writer) throws IOException {
    writer.write("vtable@");
    writer.printSignedIntAsDec(((VtableIndexInstruction)instruction).getVtableIndex());
  }
}
origin: JesusFreke/smali

protected void writeFieldOffset(IndentingWriter writer) throws IOException {
  writer.write("field@0x");
  writer.printUnsignedLongAsHex(((FieldOffsetInstruction)instruction).getFieldOffset());
}
origin: JesusFreke/smali

protected void writeInlineIndex(IndentingWriter writer) throws IOException {
  writer.write("inline@");
  writer.printSignedIntAsDec(((InlineIndexInstruction)instruction).getInlineIndex());
}
origin: JesusFreke/smali

protected void writeInvokeRangeRegisters(IndentingWriter writer) throws IOException {
  RegisterRangeInstruction instruction = (RegisterRangeInstruction)this.instruction;
  int regCount = instruction.getRegisterCount();
  if (regCount == 0) {
    writer.write("{}");
  } else {
    int startRegister = instruction.getStartRegister();
    methodDef.registerFormatter.writeRegisterRange(writer, startRegister, startRegister+regCount-1);
  }
}
org.jf.utilIndentingWriterwrite

Javadoc

Writes out a block of text that contains no newlines

Popular methods of IndentingWriter

  • <init>
  • printSignedIntAsDec
  • writeIndent
  • deindent
  • indent
  • printUnsignedIntAsDec
  • printUnsignedLongAsHex
  • printSignedLongAsDec
  • writeLine
    Writes out a block of text that contains no newlines
  • close
  • flush
  • flush

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • getContentResolver (Context)
  • runOnUiThread (Activity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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