jdk/src/sample/share/try-with-resources/index.html
author chegar
Sun, 17 Aug 2014 15:54:13 +0100
changeset 25859 3317bb8137f4
parent 22622 jdk/src/share/sample/try-with-resources/index.html@af09f3c02d2d
child 32427 c22b7e41adf3
permissions -rw-r--r--
8054834: Modular Source Code Reviewed-by: alanb, chegar, ihse, mduigou Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, magnus.ihse.bursie@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, paul.sandoz@oracle.com

<!DOCTYPE html>

<html>
<head>
    <title>Try-with-Resources Feature Demo</title>
</head>
<body>
<h2>Try-with-Resources Feature Demo</h2>

<p>
    This demo shows how to use the try-with-resources feature introduced in JDK7.
</p>

<ul>
    <li><h3>Custom AutoCloseable.</h3>

        <p>
            Shows how to use a custom resource with the try-with-resources construct.
            For more information, see the source file.
        </p>
        Source: <a href="src/CustomAutoCloseableSample.java">src/CustomAutoCloseableSample.java</a>

    <li><h3>Unzip</h3>

        <p>
            Extracts archived files. For more information, see the source file.
        </p>
        Source: <a href="src/Unzip.java">src/Unzip.java</a>
    <li><h3>ZipCat</h3>

        <p>Prints data about a specified file from an archive. For more information, see the source file.</p>
        Source: <a href="src/ZipCat.java">src/ZipCat.java</a>

</ul>
</body>
</html>