java.util.logging.FileHandler#flush ( )源码实例Demo

下面列出了java.util.logging.FileHandler#flush ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: dragonwell8_jdk   文件: CheckZombieLockTest.java
private static FileHandler createFileHandler(File writableDir) throws SecurityException,
        RuntimeException, IOException {
    // Test 1: make sure we can create FileHandler in writable directory
    try {
        FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log");
        handler.publish(new LogRecord(Level.INFO, handler.toString()));
        handler.flush();
        return handler;
    } catch (IOException ex) {
        throw new RuntimeException("Test failed: should have been able"
                + " to create FileHandler for " + "%t/" + WRITABLE_DIR
                + "/log.log in writable directory.", ex);
    }
}
 
源代码2 项目: TencentKona-8   文件: CheckZombieLockTest.java
private static FileHandler createFileHandler(File writableDir) throws SecurityException,
        RuntimeException, IOException {
    // Test 1: make sure we can create FileHandler in writable directory
    try {
        FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log");
        handler.publish(new LogRecord(Level.INFO, handler.toString()));
        handler.flush();
        return handler;
    } catch (IOException ex) {
        throw new RuntimeException("Test failed: should have been able"
                + " to create FileHandler for " + "%t/" + WRITABLE_DIR
                + "/log.log in writable directory.", ex);
    }
}
 
源代码3 项目: jdk8u60   文件: CheckZombieLockTest.java
private static FileHandler createFileHandler(File writableDir) throws SecurityException,
        RuntimeException, IOException {
    // Test 1: make sure we can create FileHandler in writable directory
    try {
        FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log");
        handler.publish(new LogRecord(Level.INFO, handler.toString()));
        handler.flush();
        return handler;
    } catch (IOException ex) {
        throw new RuntimeException("Test failed: should have been able"
                + " to create FileHandler for " + "%t/" + WRITABLE_DIR
                + "/log.log in writable directory.", ex);
    }
}
 
源代码4 项目: openjdk-jdk8u   文件: CheckZombieLockTest.java
private static FileHandler createFileHandler(File writableDir) throws SecurityException,
        RuntimeException, IOException {
    // Test 1: make sure we can create FileHandler in writable directory
    try {
        FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log");
        handler.publish(new LogRecord(Level.INFO, handler.toString()));
        handler.flush();
        return handler;
    } catch (IOException ex) {
        throw new RuntimeException("Test failed: should have been able"
                + " to create FileHandler for " + "%t/" + WRITABLE_DIR
                + "/log.log in writable directory.", ex);
    }
}
 
private static FileHandler createFileHandler(File writableDir) throws SecurityException,
        RuntimeException, IOException {
    // Test 1: make sure we can create FileHandler in writable directory
    try {
        FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log");
        handler.publish(new LogRecord(Level.INFO, handler.toString()));
        handler.flush();
        return handler;
    } catch (IOException ex) {
        throw new RuntimeException("Test failed: should have been able"
                + " to create FileHandler for " + "%t/" + WRITABLE_DIR
                + "/log.log in writable directory.", ex);
    }
}
 
源代码6 项目: openjdk-jdk9   文件: CheckZombieLockTest.java
private static FileHandler createFileHandler(File writableDir) throws SecurityException,
        RuntimeException, IOException {
    // Test 1: make sure we can create FileHandler in writable directory
    try {
        FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log");
        handler.publish(new LogRecord(Level.INFO, handler.toString()));
        handler.flush();
        return handler;
    } catch (IOException ex) {
        throw new RuntimeException("Test failed: should have been able"
                + " to create FileHandler for " + "%t/" + WRITABLE_DIR
                + "/log.log in writable directory.", ex);
    }
}
 
源代码7 项目: jdk8u-jdk   文件: CheckZombieLockTest.java
private static FileHandler createFileHandler(File writableDir) throws SecurityException,
        RuntimeException, IOException {
    // Test 1: make sure we can create FileHandler in writable directory
    try {
        FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log");
        handler.publish(new LogRecord(Level.INFO, handler.toString()));
        handler.flush();
        return handler;
    } catch (IOException ex) {
        throw new RuntimeException("Test failed: should have been able"
                + " to create FileHandler for " + "%t/" + WRITABLE_DIR
                + "/log.log in writable directory.", ex);
    }
}
 
源代码8 项目: hottub   文件: CheckZombieLockTest.java
private static FileHandler createFileHandler(File writableDir) throws SecurityException,
        RuntimeException, IOException {
    // Test 1: make sure we can create FileHandler in writable directory
    try {
        FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log");
        handler.publish(new LogRecord(Level.INFO, handler.toString()));
        handler.flush();
        return handler;
    } catch (IOException ex) {
        throw new RuntimeException("Test failed: should have been able"
                + " to create FileHandler for " + "%t/" + WRITABLE_DIR
                + "/log.log in writable directory.", ex);
    }
}
 
源代码9 项目: jdk8u_jdk   文件: CheckZombieLockTest.java
private static FileHandler createFileHandler(File writableDir) throws SecurityException,
        RuntimeException, IOException {
    // Test 1: make sure we can create FileHandler in writable directory
    try {
        FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log");
        handler.publish(new LogRecord(Level.INFO, handler.toString()));
        handler.flush();
        return handler;
    } catch (IOException ex) {
        throw new RuntimeException("Test failed: should have been able"
                + " to create FileHandler for " + "%t/" + WRITABLE_DIR
                + "/log.log in writable directory.", ex);
    }
}
 
源代码10 项目: jdk8u-jdk   文件: CheckZombieLockTest.java
private static FileHandler createFileHandler(File writableDir) throws SecurityException,
        RuntimeException, IOException {
    // Test 1: make sure we can create FileHandler in writable directory
    try {
        FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log");
        handler.publish(new LogRecord(Level.INFO, handler.toString()));
        handler.flush();
        return handler;
    } catch (IOException ex) {
        throw new RuntimeException("Test failed: should have been able"
                + " to create FileHandler for " + "%t/" + WRITABLE_DIR
                + "/log.log in writable directory.", ex);
    }
}
 
源代码11 项目: ignite   文件: JavaLoggerFileHandler.java
/** {@inheritDoc} */
@SuppressWarnings("NonSynchronizedMethodOverridesSynchronizedMethod")
@Override public void flush() {
    FileHandler delegate0 = delegate;

    if (delegate0 != null)
        delegate0.flush();
}
 
源代码12 项目: jdk8u-dev-jdk   文件: CheckZombieLockTest.java
private static FileHandler createFileHandler(File writableDir) throws SecurityException,
        RuntimeException, IOException {
    // Test 1: make sure we can create FileHandler in writable directory
    try {
        FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log");
        handler.publish(new LogRecord(Level.INFO, handler.toString()));
        handler.flush();
        return handler;
    } catch (IOException ex) {
        throw new RuntimeException("Test failed: should have been able"
                + " to create FileHandler for " + "%t/" + WRITABLE_DIR
                + "/log.log in writable directory.", ex);
    }
}