Java Code Examples for sun.awt.datatransfer.DataTransferer#isFlavorNoncharsetTextType()

The following examples show how to use sun.awt.datatransfer.DataTransferer#isFlavorNoncharsetTextType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DataFlavor.java    From jdk1.8-source-analysis with Apache License 2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 2
Source File: DataFlavor.java    From dragonwell8_jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 3
Source File: DataFlavor.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 4
Source File: DataFlavor.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 5
Source File: DataFlavor.java    From JDKSourceCode1.8 with MIT License 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 6
Source File: DataFlavor.java    From openjdk-jdk8u with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 7
Source File: DataFlavor.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 8
Source File: DataFlavor.java    From jdk8u-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 9
Source File: DataFlavor.java    From Java8CN with Apache License 2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 10
Source File: DataFlavor.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 11
Source File: DataFlavor.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 12
Source File: DataFlavor.java    From openjdk-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 13
Source File: DataFlavor.java    From jdk8u_jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 14
Source File: DataFlavor.java    From jdk8u-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 15
Source File: DataFlavor.java    From jdk-1.7-annotated with Apache License 2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}
 
Example 16
Source File: DataFlavor.java    From jdk8u-dev-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether this <code>DataFlavor</code> is a valid text flavor for
 * this implementation of the Java platform. Only flavors equivalent to
 * <code>DataFlavor.stringFlavor</code> and <code>DataFlavor</code>s with
 * a primary MIME type of "text" can be valid text flavors.
 * <p>
 * If this flavor supports the charset parameter, it must be equivalent to
 * <code>DataFlavor.stringFlavor</code>, or its representation must be
 * <code>java.io.Reader</code>, <code>java.lang.String</code>,
 * <code>java.nio.CharBuffer</code>, <code>[C</code>,
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>. If the representation is
 * <code>java.io.InputStream</code>, <code>java.nio.ByteBuffer</code>, or
 * <code>[B</code>, then this flavor's <code>charset</code> parameter must
 * be supported by this implementation of the Java platform. If a charset
 * is not specified, then the platform default charset, which is always
 * supported, is assumed.
 * <p>
 * If this flavor does not support the charset parameter, its
 * representation must be <code>java.io.InputStream</code>,
 * <code>java.nio.ByteBuffer</code>, or <code>[B</code>.
 * <p>
 * See <code>selectBestTextFlavor</code> for a list of text flavors which
 * support the charset parameter.
 *
 * @return <code>true</code> if this <code>DataFlavor</code> is a valid
 *         text flavor as described above; <code>false</code> otherwise
 * @see #selectBestTextFlavor
 * @since 1.4
 */
public boolean isFlavorTextType() {
    return (DataTransferer.isFlavorCharsetTextType(this) ||
            DataTransferer.isFlavorNoncharsetTextType(this));
}