code: @Override
     public final void close() throws IOException {
        out.close();
        if (orig != null) {
           secondPass(new BufferedInputStream(new FileInputStream(tempFile), bufferSize), orig);
           tempFile.delete();
        }
     }
docs: closes the outputstream and calls {@link #secondPass(java.io.OutputStream) } with the original outputstream. Note
  that the original outputstream may be null when a subclass did not call {@link #setOut(java.io.OutputStream) }
  
  @throws IOException