@@ -0,0 +1,1952 @@
+/**%0A * The MIT License (MIT)%0A * Copyright (c) 2016 Mark Bernard%0A * %0A * Permission is hereby granted, free of charge, to any person obtaining a copy of %0A * this software and associated documentation files (the %22Software%22), to deal in the %0A * Software without restriction, including without limitation the rights to use, copy, %0A * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, %0A * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:%0A * %0A * The above copyright notice and this permission notice shall be included in all copies or %0A * substantial portions of the Software.%0A * %0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, %0A * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR %0A * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE %0A * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR %0A * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.%0A */%0Apackage io.github.markbernard.jnotepad;%0A%0Aimport java.io.IOException;%0Aimport java.io.Reader;%0Aimport java.io.Writer;%0A%0A/**%0A * @author Mark Bernard%0A */%0Apublic class ResourceCleanup %7B%0A    /**%0A     * Close a reader safely.%0A     * %0A     * @param reader%0A     */%0A    public static final void close(Reader reader) %7B%0A        if (reader != null) %7B%0A            try %7B%0A                reader.close();%0A            %7D catch (IOException e) %7B%0A                //cannot do anything%0A            %7D%0A        %7D%0A    %7D%0A%0A    /**%0A     * Close a writer safely.%0A     * %0A     * @param writer%0A     */%0A    public static final void close(Writer writer) %7B%0A        if (writer != null) %7B%0A            try %7B%0A                writer.close();%0A            %7D catch (IOException e) %7B%0A                //cannot do anything%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Create ResourceCleanup.java