public boolean removeOutputStream(OutputStream out) {
    synchronized (lock) {
      final Set<OutputStream> oldSet = streams;
      if (!oldSet.contains(out)) {
        return false;
      } else if (oldSet.size() == 1) {
        streams = Collections.emptySet();
        return true;
      } else {
        final Set<OutputStream> newSet = new HashSet<>(oldSet);
        final boolean removed = newSet.remove(out);
        streams = newSet;
        return removed;
      }
    }
  }
@return <tt>true</tt> if this CompositeOutputStream contained the specified OutputStream
geode-core/src/main/java/org/apache/geode/internal/io/CompositeOutputStream.java