Tabnine Logo
IndentingWriter.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.jf.util.IndentingWriter
constructor

Best Java code snippets using org.jf.util.IndentingWriter.<init> (Showing top 12 results out of 315)

origin: pxb1988/dex2jar

  private static String baksmali(DexBackedClassDef def) throws IOException {
    baksmaliOptions opts = new baksmaliOptions();
    opts.outputDebugInfo = false;
    opts.syntheticAccessorResolver = new SyntheticAccessorResolver(Collections.EMPTY_LIST);
    ClassDefinition classDefinition = new ClassDefinition(opts, def);
    StringWriter bufWriter = new StringWriter();
    IndentingWriter writer = new IndentingWriter(bufWriter);
    classDefinition.writeTo((IndentingWriter) writer);
    writer.flush();
    return bufWriter.toString();
  }
}
origin: com.taobao.android/dex_patch

IndentingWriter writer = new IndentingWriter(stringWriter);
MethodDefinition methodDefinition = new MethodDefinition(toClassDefinition(dexBackedMethodImplementation),
    dexBackedMethodImplementation.method,
origin: com.taobao.android/dex_patch

      new FileOutputStream(smaliFile), "UTF8"));
  writer = new IndentingWriter(bufWriter);
  classDefinition.writeTo((IndentingWriter)writer);
} catch (Exception ex) {
origin: testwhat/SmaliEx

      new FileOutputStream(smaliFile), "UTF8"));
  writer = new IndentingWriter(bufWriter);
  classDefinition.writeTo((IndentingWriter)writer);
} catch (Exception ex) {
origin: org.smali/baksmali

      new FileOutputStream(smaliFile), "UTF8"));
  writer = new IndentingWriter(bufWriter);
  classDefinition.writeTo((IndentingWriter)writer);
} catch (Exception ex) {
origin: KB5201314/ZjDroid

      new FileOutputStream(smaliFile), "UTF8"));
  writer = new IndentingWriter(bufWriter);
  classDefinition.writeTo((IndentingWriter)writer);
} catch (Exception ex) {
origin: com.taobao.android/dex_patch

      new FileOutputStream(smaliFile), "UTF8"));
  writer = new IndentingWriter(bufWriter);
  classDefinition.writeTo((IndentingWriter)writer);
} catch (Exception ex) {
origin: testwhat/SmaliEx

public static void writeSmaliContent(@Nonnull String type,
                   @Nonnull ClassPath classPath,
                   @Nonnull java.io.Writer outWriter) {
  final org.jf.baksmali.BaksmaliOptions options = new org.jf.baksmali.BaksmaliOptions();
  final org.jf.dexlib2.iface.ClassDef classDef = classPath.getClassDef(type);
  options.apiLevel = VersionMap.mapArtVersionToApi(classPath.oatVersion);
  options.allowOdex = true;
  options.classPath = classPath;
  final ClassDefinition cd = new ClassDefinition(options, classDef);
  try {
    org.jf.util.IndentingWriter writer = new org.jf.util.IndentingWriter(outWriter);
    cd.writeTo(writer);
  } catch (IOException ex) {
    LLog.ex(ex);
  }
}
origin: KB5201314/ZjDroid

          "UTF8"));
  writer = new IndentingWriter(bufWriter);
  classDefinition.writeTo((IndentingWriter) writer);
} catch (Exception ex) {
origin: testwhat/SmaliEx

  @Test
  public void testPrintSignedLongAsDec() throws IOException {
    StringWriter stringWriter = new StringWriter();
    IndentingWriter writer = new IndentingWriter(stringWriter);

    writer.printUnsignedIntAsDec(-1);
    writer.close();

    Assert.assertEquals("4294967295", stringWriter.toString());
  }
}
origin: testwhat/SmaliEx

@Nonnull
public static String getNormalizedSmali(@Nonnull ClassDef classDef, @Nonnull BaksmaliOptions options,
                    boolean stripComments)
    throws IOException {
  StringWriter stringWriter = new StringWriter();
  IndentingWriter writer = new IndentingWriter(stringWriter);
  ClassDefinition classDefinition = new ClassDefinition(options, classDef);
  classDefinition.writeTo(writer);
  writer.close();
  return normalizeSmali(stringWriter.toString(), stripComments);
}
origin: testwhat/SmaliEx

public void runTest(String test, boolean registerInfo, boolean isArt) throws IOException, URISyntaxException {
  String dexFilePath = String.format("%s%sclasses.dex", test, File.separatorChar);
  DexFile dexFile = DexFileFactory.loadDexFile(findResource(dexFilePath), Opcodes.getDefault());
  BaksmaliOptions options = new BaksmaliOptions();
  if (registerInfo) {
    options.registerInfo = BaksmaliOptions.ALL | BaksmaliOptions.FULLMERGE;
    if (isArt) {
      options.classPath = new ClassPath(new ArrayList<ClassProvider>(), true, 56);
    } else {
      options.classPath = new ClassPath();
    }
  }
  options.implicitReferences = false;
  for (ClassDef classDef: dexFile.getClasses()) {
    StringWriter stringWriter = new StringWriter();
    IndentingWriter writer = new IndentingWriter(stringWriter);
    ClassDefinition classDefinition = new ClassDefinition(options, classDef);
    classDefinition.writeTo(writer);
    writer.close();
    String className = classDef.getType();
    String smaliPath = String.format("%s%s%s.smali", test, File.separatorChar,
        className.substring(1, className.length() - 1));
    String smaliContents = readResource(smaliPath);
    Assert.assertEquals(BaksmaliTestUtils.normalizeWhitespace(smaliContents),
        BaksmaliTestUtils.normalizeWhitespace((stringWriter.toString())));
  }
}
org.jf.utilIndentingWriter<init>

Popular methods of IndentingWriter

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top plugins for WebStorm
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