src/share/classes/java/awt/datatransfer/DataFlavor.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1996, 2006, 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) 1996, 2014, 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
*** 1182,1218 ****
return mimeType.match(mtype);
}
/**
* Does the <code>DataFlavor</code> represent a serialized object?
*/
-
public boolean isMimeTypeSerializedObject() {
return isMimeTypeEqual(javaSerializedObjectMimeType);
}
public final Class<?> getDefaultRepresentationClass() {
return ioInputStreamClass;
}
public final String getDefaultRepresentationClassAsString() {
return getDefaultRepresentationClass().getName();
}
/**
* Does the <code>DataFlavor</code> represent a
* <code>java.io.InputStream</code>?
*/
-
public boolean isRepresentationClassInputStream() {
return ioInputStreamClass.isAssignableFrom(representationClass);
}
/**
* Returns whether the representation class for this
* <code>DataFlavor</code> is <code>java.io.Reader</code> or a subclass
* thereof.
*
* @since 1.4
*/
public boolean isRepresentationClassReader() {
return java.io.Reader.class.isAssignableFrom(representationClass);
--- 1182,1230 ----
return mimeType.match(mtype);
}
/**
* Does the <code>DataFlavor</code> represent a serialized object?
+ * @return whether or not a serialized object is represented
*/
public boolean isMimeTypeSerializedObject() {
return isMimeTypeEqual(javaSerializedObjectMimeType);
}
+ /**
+ * Returns the default representation class.
+ * @return the default representation class
+ */
public final Class<?> getDefaultRepresentationClass() {
return ioInputStreamClass;
}
+ /**
+ * Returns the name of the default representation class.
+ * @return the name of the default representation class
+ */
public final String getDefaultRepresentationClassAsString() {
return getDefaultRepresentationClass().getName();
}
/**
* Does the <code>DataFlavor</code> represent a
* <code>java.io.InputStream</code>?
+ * @return whether or not this {@code DataFlavor} represent a
+ * {@code java.io.InputStream}
*/
public boolean isRepresentationClassInputStream() {
return ioInputStreamClass.isAssignableFrom(representationClass);
}
/**
* Returns whether the representation class for this
* <code>DataFlavor</code> is <code>java.io.Reader</code> or a subclass
* thereof.
+ * @return whether or not the representation class for this
+ * {@code DataFlavor} is {@code java.io.Reader} or a subclass
+ * thereof
*
* @since 1.4
*/
public boolean isRepresentationClassReader() {
return java.io.Reader.class.isAssignableFrom(representationClass);
*** 1220,1229 ****
--- 1232,1244 ----
/**
* Returns whether the representation class for this
* <code>DataFlavor</code> is <code>java.nio.CharBuffer</code> or a
* subclass thereof.
+ * @return whether or not the representation class for this
+ * {@code DataFlavor} is {@code java.nio.CharBuffer} or a subclass
+ * thereof
*
* @since 1.4
*/
public boolean isRepresentationClassCharBuffer() {
return java.nio.CharBuffer.class.isAssignableFrom(representationClass);
*** 1231,1240 ****
--- 1246,1258 ----
/**
* Returns whether the representation class for this
* <code>DataFlavor</code> is <code>java.nio.ByteBuffer</code> or a
* subclass thereof.
+ * @return whether or not the representation class for this
+ * {@code DataFlavor} is {@code java.nio.ByteBuffer} or a subclass
+ * thereof
*
* @since 1.4
*/
public boolean isRepresentationClassByteBuffer() {
return java.nio.ByteBuffer.class.isAssignableFrom(representationClass);
*** 1406,1415 ****
--- 1424,1436 ----
* This method is called for each parameter name/value pair and should
* return the normalized representation of the <code>parameterValue</code>.
*
* This method is never invoked by this implementation from 1.1 onwards.
*
+ * @param parameterName the parameter name
+ * @param parameterValue the parameter value
+ * @return the parameter value
* @deprecated
*/
@Deprecated
protected String normalizeMimeTypeParameter(String parameterName, String parameterValue) {
return parameterValue;
*** 1422,1431 ****
--- 1443,1454 ----
* parameter/value pairs in cases where none are present in the MIME
* type string passed in.
*
* This method is never invoked by this implementation from 1.1 onwards.
*
+ * @param mimeType the mime type
+ * @return the mime type
* @deprecated
*/
@Deprecated
protected String normalizeMimeType(String mimeType) {
return mimeType;