Package org.apache.jena.atlas.io

Examples of org.apache.jena.atlas.io.IndentedLineBuffer.asString()


                    buffer.print(", ");
                }
            }
        }
       
        return buffer.asString();
    }
   
    /**
     * Gets user friendly version information for all registered classes as a string
     */
 
View Full Code Here


    {
        IndentedLineBuffer iBuff = new IndentedLineBuffer() ;
        ItemWriter.write(iBuff, this, null) ;
        //iBuff.getIndentedWriter().ensureStartOfLine() ;
        //iBuff.getIndentedWriter().flush() ;
        return iBuff.asString() ;
    }
   
    public String shortString()
    {
        if ( isSymbol() ) return getSymbol();
View Full Code Here

    private String formatForLog(Query query)
    {
        IndentedLineBuffer out = new IndentedLineBuffer() ;
        out.setFlatMode(true) ;
        query.serialize(out) ;
        return out.asString() ;
    }
       
    private String getRemoteString(String queryURI)
    {
        return HttpOp.execHttpGetString(queryURI) ;
View Full Code Here

    @Test public void write01()
    {
        IndentedLineBuffer b = new IndentedLineBuffer() ;
        b.print("hell") ;
        b.print("o") ;
        assertEquals("hello", b.asString()) ;
    }
   
    @Test public void write02()
    {
        IndentedLineBuffer b = new IndentedLineBuffer() ;
View Full Code Here

        IndentedLineBuffer b = new IndentedLineBuffer() ;
        b.incIndent() ;
        b.print("hell") ;
        b.print("o") ;
        b.decIndent() ;
        assertEquals("  hello", b.asString()) ;
    }
   
    @Test public void write03()
    {
        IndentedLineBuffer b = new IndentedLineBuffer() ;
View Full Code Here

        b.incIndent() ;
        b.printf("0x%04X", 1) ;
        b.println() ;
        b.print("XX") ;
        b.decIndent() ;
        assertEquals("  0x0001\n  XX", b.asString()) ;
    }
   
}
View Full Code Here

   
    public static String outputQuotedString(String string)
    {
        IndentedLineBuffer b = new IndentedLineBuffer() ;
        outputQuotedString(b, string) ;
        return b.asString() ;
    }
   
    private static boolean writeJavaScript = false ;
   
    /* \"  \\ \/ \b \f \n \r \t
View Full Code Here

{
    public static String asSSE(Table table)
    {
        IndentedLineBuffer out = new IndentedLineBuffer() ;
        TableWriter.output(table, out) ;
        return out.asString() ;
    }
   
    public static void output(Table table, IndentedWriter out)
    {
        output(table, out, null) ;
View Full Code Here

    {
        startFixed(outStream) ;
        IndentedLineBuffer out = new IndentedLineBuffer(lineNumbers) ;
        content.print(out) ;
        out.flush()
        String x = htmlQuote(out.asString()) ;
        byte b[] = x.getBytes("UTF-8") ;
        outStream.write(b) ;
        finishFixed(outStream) ;
    }
}
View Full Code Here

    {
        startFixed(outStream) ;
        IndentedLineBuffer out = new IndentedLineBuffer(lineNumbers) ;
        content.print(out) ;
        out.flush()
        String x = htmlQuote(out.asString()) ;
        byte b[] = x.getBytes("UTF-8") ;
        outStream.write(b) ;
        finishFixed(outStream) ;
    }
}
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.