Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java try-with-resources nested streams

try (FileWriter fw=new FileWriter(file)) {
    try (BufferedWriter bw=new BufferedWriter(fw)) {
        bw.write(text);
    } catch (IOException ex) {
        // handle ex
    }
} catch (IOException ex) {
    // handle ex
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #nested #streams
ADD COMMENT
Topic
Name
6+2 =