Code example for PrintStream

Methods: close, println

0
    // END android-added 
 
    // BEGIN android-added 
    protected byte[] writeProperties() { 
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        PrintStream ps = new PrintStream(bout);
        ps.println("#commented.entry=Bogus");
        ps.println("test.pkg=tests.security");
        ps.println("test.proj=Unit Tests");
        ps.close();
        return bout.toByteArray();
    } 
    // END android-added 
 
    // BEGIN android-added 
    static class TestSecurityManager extends SecurityManager {
        boolean called = false;
        private final String permissionName;
 
        public TestSecurityManager(String permissionName) {
            this.permissionName = permissionName;