< prev index next >

jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * 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

@@ -65,12 +65,13 @@
      * preference for providing the data (from most richly descriptive to
      * least descriptive).
      *
      * @return The DataFlavors.
      */
+    @Override
     public DataFlavor[] getTransferDataFlavors() {
-        return (DataFlavor[]) Arrays.copyOf(flavor, flavor.length);
+        return Arrays.copyOf(flavor, flavor.length);
     }
 
     /**
      * Returns an object which represents the data to be transferred.
      * The class of the object returned is defined by the representation class

@@ -78,10 +79,11 @@
      *
      * @param df The DataFlavor representing the requested type.
      * @param ds The DataSource representing the data to be converted.
      * @return The constructed Object.
      */
+    @Override
     public Object getTransferData(DataFlavor df, DataSource ds)
         throws IOException {
         for (int i=0; i < flavor.length; i++) {
             if (flavor[i].equals(df)) {
                 return getContent(ds);

@@ -96,24 +98,25 @@
      * returned by the <code>getTransferDataFlavors</code> method.
      *
      * @param ds The DataSource representing the data to be converted.
      * @return The constructed Object.
      */
+    @Override
     public Object getContent(DataSource ds) throws IOException {
         return ImageIO.read(new BufferedInputStream(ds.getInputStream()));
     }
 
     /**
      * Convert the object to a byte stream of the specified MIME type
      * and write it to the output stream.
      *
      * @param obj   The object to be converted.
-     * @param mimeType  The requested MIME type of the resulting byte stream.
+     * @param type  The requested MIME type of the resulting byte stream.
      * @param os    The output stream into which to write the converted
      *          byte stream.
      */
-
+    @Override
     public void writeTo(Object obj, String type, OutputStream os)
         throws IOException {
 
         try {
             BufferedImage bufImage = null;
< prev index next >