Code example for Vector

Methods: add, set, size

0
	 * for a given type, or the metadata format will be affected. 
	 * @param type The actual MIME type string. Do not include ;charset= etc; these are 
	 * parameters and there is a separate mechanism for them. 
	 */ 
	protected static synchronized void addMIMEType(short number, String type) {
		if(mimeTypesByNumber.size() > number) {
			String s = mimeTypesByNumber.get(number);
			if(s != null) throw new IllegalArgumentException("Already used: "+number);
		} else { 
			mimeTypesByNumber.add(number, null);
		} 
		mimeTypesByNumber.set(number, type);
		mimeTypesByName.put(type, number);
	} 
 
	/** 
	 * Add a MIME type. 
	 * @param number The number of the MIME type for compression. This *must not change* 
	 * for a given type, or the metadata format will be affected. 
	 * @param type The actual MIME type string. Do not include ;charset= etc; these are 
	 * parameters and there is a separate mechanism for them.