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

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

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

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.utilIndentingWriterclose

Popular methods of IndentingWriter

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

Popular in Java

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Path (java.nio.file)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best plugins for Eclipse
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