code: @Override
      public void close() throws IOException {
          // Is the pipe connected?
          PipedInputStream stream = target;
          if (stream != null) {
              stream.done();
              target = null;
          }
      }
docs: Closes this stream. If this stream is connected to an input stream, the
  input stream is closed and the pipe is disconnected.
  
  @throws IOException
  if an error occurs while closing this stream.