Examples of IndentingWriter


Examples of info.aduna.io.IndentingWriter

   *
   * @param writer
   *        The Writer to write the Turtle document to.
   */
  public TurtleWriter(Writer writer) {
    this.writer = new IndentingWriter(writer);
    namespaceTable = new LinkedHashMap<String, String>();
    writingStarted = false;
    statementClosed = true;
    lastWrittenSubject = null;
    lastWrittenPredicate = null;
View Full Code Here

Examples of info.aduna.io.IndentingWriter

   *--------------*/

    public SPARQLResultsJSONWriter(OutputStream out) {
        Writer w = new OutputStreamWriter(out, Charset.forName("UTF-8"));
        w = new BufferedWriter(w, 1024);
        writer = new IndentingWriter(w);
    }
View Full Code Here

Examples of org.jf.util.IndentingWriter

            }

            BufferedWriter bufWriter = new BufferedWriter(new OutputStreamWriter(
                    new FileOutputStream(smaliFile), "UTF8"));

            writer = new IndentingWriter(bufWriter);
            classDefinition.writeTo((IndentingWriter)writer);
        } catch (Exception ex) {
            System.err.println("\n\nError occurred while disassembling class " + classDescriptor.replace('/', '.') + " - skipping class");
            ex.printStackTrace();
            // noinspection ResultOfMethodCallIgnored
View Full Code Here

Examples of org.jf.util.IndentingWriter

        }
        options.useImplicitReferences = 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);
View Full Code Here

Examples of org.jf.util.IndentingWriter

        baksmaliOptions options = new baksmaliOptions();
        options.useImplicitReferences = true;

        StringWriter stringWriter = new StringWriter();
        IndentingWriter writer = new IndentingWriter(stringWriter);
        ClassDefinition classDefinition = new ClassDefinition(options, classDef);
        classDefinition.writeTo(writer);
        writer.close();

        Assert.assertEquals(TextUtils.normalizeWhitespace(expected),
                TextUtils.normalizeWhitespace(stringWriter.toString()));
    }
View Full Code Here

Examples of org.jf.util.IndentingWriter

        baksmaliOptions options = new baksmaliOptions();
        options.useImplicitReferences = false;

        StringWriter stringWriter = new StringWriter();
        IndentingWriter writer = new IndentingWriter(stringWriter);
        ClassDefinition classDefinition = new ClassDefinition(options, classDef);
        classDefinition.writeTo(writer);
        writer.close();

        Assert.assertEquals(TextUtils.normalizeWhitespace(expected),
                TextUtils.normalizeWhitespace(stringWriter.toString()));
    }
View Full Code Here

Examples of org.jf.util.IndentingWriter

        baksmaliOptions options = new baksmaliOptions();
        options.useImplicitReferences = true;

        StringWriter stringWriter = new StringWriter();
        IndentingWriter writer = new IndentingWriter(stringWriter);
        ClassDefinition classDefinition = new ClassDefinition(options, classDef);
        classDefinition.writeTo(writer);
        writer.close();

        Assert.assertEquals(TextUtils.normalizeWhitespace(expected),
                TextUtils.normalizeWhitespace(stringWriter.toString()));
    }
View Full Code Here

Examples of org.jf.util.IndentingWriter

        baksmaliOptions options = new baksmaliOptions();
        options.useImplicitReferences = false;

        StringWriter stringWriter = new StringWriter();
        IndentingWriter writer = new IndentingWriter(stringWriter);
        ClassDefinition classDefinition = new ClassDefinition(options, classDef);
        classDefinition.writeTo(writer);
        writer.close();

        Assert.assertEquals(TextUtils.normalizeWhitespace(expected),
                TextUtils.normalizeWhitespace(stringWriter.toString()));
    }
View Full Code Here

Examples of org.jf.util.IndentingWriter

        baksmaliOptions options = new baksmaliOptions();
        options.useImplicitReferences = true;

        StringWriter stringWriter = new StringWriter();
        IndentingWriter writer = new IndentingWriter(stringWriter);
        ClassDefinition classDefinition = new ClassDefinition(options, classDef);
        classDefinition.writeTo(writer);
        writer.close();

        Assert.assertEquals(TextUtils.normalizeWhitespace(expected),
                TextUtils.normalizeWhitespace(stringWriter.toString()));
    }
View Full Code Here

Examples of org.jf.util.IndentingWriter

        baksmaliOptions options = new baksmaliOptions();
        options.useImplicitReferences = false;

        StringWriter stringWriter = new StringWriter();
        IndentingWriter writer = new IndentingWriter(stringWriter);
        ClassDefinition classDefinition = new ClassDefinition(options, classDef);
        classDefinition.writeTo(writer);
        writer.close();

        Assert.assertEquals(TextUtils.normalizeWhitespace(expected),
                TextUtils.normalizeWhitespace(stringWriter.toString()));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.