Search in sources :

Example 6 with CharArrayWriter

use of java.io.CharArrayWriter in project NoHttp by yanzhenjie.

the class IOUtils method toCharArray.

public static char[] toCharArray(InputStream input) throws IOException {
    CharArrayWriter output = new CharArrayWriter();
    write(input, output);
    return output.toCharArray();
}
Also used : CharArrayWriter(java.io.CharArrayWriter)

Example 7 with CharArrayWriter

use of java.io.CharArrayWriter in project NoHttp by yanzhenjie.

the class IOUtils method toCharArray.

public static char[] toCharArray(Reader input) throws IOException {
    CharArrayWriter output = new CharArrayWriter();
    write(input, output);
    return output.toCharArray();
}
Also used : CharArrayWriter(java.io.CharArrayWriter)

Example 8 with CharArrayWriter

use of java.io.CharArrayWriter in project NoHttp by yanzhenjie.

the class IOUtils method toCharArray.

public static char[] toCharArray(InputStream input, String encoding) throws IOException {
    CharArrayWriter output = new CharArrayWriter();
    write(input, output, encoding);
    return output.toCharArray();
}
Also used : CharArrayWriter(java.io.CharArrayWriter)

Example 9 with CharArrayWriter

use of java.io.CharArrayWriter in project android_frameworks_base by ResurrectionRemix.

the class DiskInfo method toString.

@Override
public String toString() {
    final CharArrayWriter writer = new CharArrayWriter();
    dump(new IndentingPrintWriter(writer, "    ", 80));
    return writer.toString();
}
Also used : CharArrayWriter(java.io.CharArrayWriter) IndentingPrintWriter(com.android.internal.util.IndentingPrintWriter)

Example 10 with CharArrayWriter

use of java.io.CharArrayWriter in project android_frameworks_base by ResurrectionRemix.

the class StorageVolume method dump.

/** {@hide} */
// TODO(b/26742218): find out where toString() is called internally and replace these calls by
// dump().
public String dump() {
    final CharArrayWriter writer = new CharArrayWriter();
    dump(new IndentingPrintWriter(writer, "    ", 80));
    return writer.toString();
}
Also used : CharArrayWriter(java.io.CharArrayWriter) IndentingPrintWriter(com.android.internal.util.IndentingPrintWriter)

Aggregations

CharArrayWriter (java.io.CharArrayWriter)211 PrintWriter (java.io.PrintWriter)51 IOException (java.io.IOException)39 IndentingPrintWriter (com.android.internal.util.IndentingPrintWriter)21 Test (org.junit.Test)11 InputStreamReader (java.io.InputStreamReader)9 Map (java.util.Map)9 BufferedReader (java.io.BufferedReader)8 File (java.io.File)8 ArrayList (java.util.ArrayList)8 TitledBorder (javax.swing.border.TitledBorder)8 EdgeListGraph (edu.cmu.tetrad.graph.EdgeListGraph)7 Graph (edu.cmu.tetrad.graph.Graph)7 Writable (groovy.lang.Writable)7 CharArrayReader (java.io.CharArrayReader)7 Reader (java.io.Reader)7 Date (java.util.Date)7 InputStream (java.io.InputStream)6 StringReader (java.io.StringReader)6 IKnowledge (edu.cmu.tetrad.data.IKnowledge)5