Tools - Print

Anmol dwivedi
0


java.lang.System.setOut(new java.io.PrintStream(new java.io.OutputStream() {
java.io.ByteArrayOutputStream outputStream = new java.io.ByteArrayOutputStream();
@Override
public void write(int oneByte) throws java.io.IOException {
outputStream.write(oneByte);
textview1.setText(new String(outputStream.toByteArray()));
}
}));
//Testing the System.out stream
java.lang.System.out.println("Test");
java.lang.System.out.println("Test 2");

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment (0)
Our website uses cookies to enhance your experience. Learn More
Accept !