@Override
  public void close() throws IOException {
    final ClassLoader delegate = myDelegate;
    if (delegate instanceof Closeable) {
      ((Closeable)delegate).close();
      myDelegate = null;
    }
  }
@Override
  public void close()