Code example for PropertyChangeSupport

0
 */ 
public abstract class Pack200Adapter { 
 
	protected static final int DEFAULT_BUFFER_SIZE = 8192;
 
	private final PropertyChangeSupport support = new PropertyChangeSupport(this);
 
	private final SortedMap<String, String> properties = new TreeMap<String, String>();
 
	public SortedMap<String, String> properties() {
		return properties;
	} 
 
	public void addPropertyChangeListener(PropertyChangeListener listener) {
		support.addPropertyChangeListener(listener);
	} 
 
	protected void firePropertyChange(String propertyName, Object oldValue,
			Object newValue) {
		support.firePropertyChange(propertyName, oldValue, newValue);
	}