< prev index next >

jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.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
*** 45,71 **** public FastInfosetDataContentHandler() { } /** ! * return the DataFlavors for this <code>DataContentHandler</code> * @return The DataFlavors. */ public DataFlavor[] getTransferDataFlavors() { // throws Exception; DataFlavor flavors[] = new DataFlavor[1]; flavors[0] = new ActivationDataFlavor( FastInfosetReflection.getFastInfosetSource_class(), "application/fastinfoset", "Fast Infoset"); return flavors; } /** ! * return the Transfer Data of type DataFlavor from InputStream ! * @param df The DataFlavor. ! * @param ins The InputStream corresponding to the data. * @return The constructed Object. */ public Object getTransferData(DataFlavor flavor, DataSource dataSource) throws IOException { if (flavor.getMimeType().startsWith("application/fastinfoset")) { try { --- 45,74 ---- public FastInfosetDataContentHandler() { } /** ! * Return the DataFlavors for this <code>DataContentHandler</code> * @return The DataFlavors. */ + @Override public DataFlavor[] getTransferDataFlavors() { // throws Exception; DataFlavor flavors[] = new DataFlavor[1]; flavors[0] = new ActivationDataFlavor( FastInfosetReflection.getFastInfosetSource_class(), "application/fastinfoset", "Fast Infoset"); return flavors; } /** ! * Return the Transfer Data of type DataFlavor from InputStream ! * @param flavor The DataFlavor. ! * @param dataSource DataSource. * @return The constructed Object. + * @exception IOException in case of an I/O error */ + @Override public Object getTransferData(DataFlavor flavor, DataSource dataSource) throws IOException { if (flavor.getMimeType().startsWith("application/fastinfoset")) { try {
*** 79,88 **** --- 82,92 ---- } } return null; } + @Override public Object getContent(DataSource dataSource) throws IOException { try { return FastInfosetReflection.FastInfosetSource_new( dataSource.getInputStream()); }
*** 90,103 **** throw new IOException(e.getMessage()); } } /** ! * construct an object from a byte stream * (similar semantically to previous method, we are deciding * which one to support) */ public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException { if (!mimeType.equals("application/fastinfoset")) { throw new IOException("Invalid content type \"" + mimeType --- 94,108 ---- throw new IOException(e.getMessage()); } } /** ! * Construct an object from a byte stream * (similar semantically to previous method, we are deciding * which one to support) */ + @Override public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException { if (!mimeType.equals("application/fastinfoset")) { throw new IOException("Invalid content type \"" + mimeType
< prev index next >