code: @Override
      public synchronized void close() {
          if (currentStatus != StreamStatus.CLOSED) {
              // Only flush the print stream: don't close it.
              currentPrintStream.flush();
  
              if (!LoggingFileUtils.tryToClose(currentPrintStream)) {
                  LoggingFileUtils.tryToClose(currentFileStream);
              }
  
              // Send to bit bucket again-- this holder is done (false -- do not replace)
              setStreamStatus(StreamStatus.CLOSED, null, null, DummyOutputStream.psInstance);
          }
      }
docs: Close this file/stream holder:
  Flush the print stream, try to close the print and file streams --
  replace the "current" stream with the bit bucket.