< prev index next >

src/java.datatransfer/share/classes/java/awt/datatransfer/MimeTypeParameterList.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 29,42 **** import java.util.Hashtable; import java.util.Iterator; import java.util.Map; import java.util.Set; - /** ! * An object that encapsulates the parameter list of a MimeType ! * as defined in RFC 2045 and 2046. * * @author jeff.dunn@eng.sun.com */ class MimeTypeParameterList implements Cloneable { --- 29,41 ---- import java.util.Hashtable; import java.util.Iterator; import java.util.Map; import java.util.Set; /** ! * An object that encapsulates the parameter list of a MimeType as defined in ! * RFC 2045 and 2046. * * @author jeff.dunn@eng.sun.com */ class MimeTypeParameterList implements Cloneable {
*** 69,81 **** return code; } // hashCode() /** ! * Two parameter lists are considered equal if they have exactly ! * the same set of parameter names and associated values. The ! * order of the parameters is not considered. */ public boolean equals(Object thatObject) { //System.out.println("MimeTypeParameterList.equals("+this+","+thatObject+")"); if (!(thatObject instanceof MimeTypeParameterList)) { return false; --- 68,80 ---- return code; } // hashCode() /** ! * Two parameter lists are considered equal if they have exactly the same ! * set of parameter names and associated values. The order of the parameters ! * is not considered. */ public boolean equals(Object thatObject) { //System.out.println("MimeTypeParameterList.equals("+this+","+thatObject+")"); if (!(thatObject instanceof MimeTypeParameterList)) { return false;
*** 244,263 **** public boolean isEmpty() { return parameters.isEmpty(); } /** ! * Retrieve the value associated with the given name, or null if there ! * is no current association. */ public String get(String name) { return parameters.get(name.trim().toLowerCase()); } /** ! * Set the value to be associated with the given name, replacing ! * any previous association. */ public void set(String name, String value) { parameters.put(name.trim().toLowerCase(), value); } --- 243,262 ---- public boolean isEmpty() { return parameters.isEmpty(); } /** ! * Retrieve the value associated with the given name, or {@code null} if ! * there is no current association. */ public String get(String name) { return parameters.get(name.trim().toLowerCase()); } /** ! * Set the value to be associated with the given name, replacing any ! * previous association. */ public void set(String name, String value) { parameters.put(name.trim().toLowerCase(), value); }
*** 292,301 **** --- 291,302 ---- return buffer.toString(); } /** + * Returns a clone of this object. + * * @return a clone of this object */ @SuppressWarnings("unchecked") // Cast from clone public Object clone() { MimeTypeParameterList newObj = null;
*** 317,328 **** private static boolean isTokenChar(char c) { return ((c > 040) && (c < 0177)) && (TSPECIALS.indexOf(c) < 0); } /** ! * return the index of the first non white space character in ! * rawdata at or after index i. */ private static int skipWhiteSpace(String rawdata, int i) { int length = rawdata.length(); if (i < length) { char c = rawdata.charAt(i); --- 318,329 ---- private static boolean isTokenChar(char c) { return ((c > 040) && (c < 0177)) && (TSPECIALS.indexOf(c) < 0); } /** ! * Returns the index of the first non white space character in ! * {@code rawdata} at or after index {@code i}. */ private static int skipWhiteSpace(String rawdata, int i) { int length = rawdata.length(); if (i < length) { char c = rawdata.charAt(i);
*** 372,382 **** return value; } } /** ! * A routine that knows how to strip the quotes and escape sequences from the given value. */ private static String unquote(String value) { int valueLength = value.length(); StringBuilder buffer = new StringBuilder(valueLength); --- 373,384 ---- return value; } } /** ! * A routine that knows how to strip the quotes and escape sequences from ! * the given value. */ private static String unquote(String value) { int valueLength = value.length(); StringBuilder buffer = new StringBuilder(valueLength);
*** 398,404 **** /** * A string that holds all the special chars. */ private static final String TSPECIALS = "()<>@,;:\\\"/[]?="; - } --- 400,405 ----
< prev index next >