MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

exceptions/TryWithResources.java:8–18  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

6
7public class TryWithResources {
8 public static void main(String[] args) {
9 try(
10 InputStream in = new FileInputStream(
11 new File("TryWithResources.java"))
12 ) {
13 int contents = in.read();
14 // Process contents
15 } catch(IOException e) {
16 // Handle the error
17 }
18 }
19}

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected