jaxws/src/java.activation/share/classes/javax/activation/DataContentHandler.java
changeset 36523 116e5d5cdade
parent 25871 b80b84e87032
equal deleted inserted replaced
36522:0017f3cf1657 36523:116e5d5cdade
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    31 import java.io.IOException;
    31 import java.io.IOException;
    32 import java.io.OutputStream;
    32 import java.io.OutputStream;
    33 import javax.activation.DataSource;
    33 import javax.activation.DataSource;
    34 
    34 
    35 /**
    35 /**
    36  * The DataContentHandler interface is implemented by objects that can
    36  * <p>The DataContentHandler interface is implemented by objects that can
    37  * be used to extend the capabilities of the DataHandler's implementation
    37  * be used to extend the capabilities of the DataHandler's implementation
    38  * of the Transferable interface. Through <code>DataContentHandlers</code>
    38  * of the Transferable interface. Through <code>DataContentHandlers</code>
    39  * the framework can be extended to convert streams in to objects, and
    39  * the framework can be extended to convert streams in to objects, and
    40  * to write objects to streams. <p>
    40  * to write objects to streams.</p>
    41  *
    41  *
    42  * Applications don't generally call the methods in DataContentHandlers
    42  * <p>An implementation of DataContentHandler should be a public class
       
    43  * with a public no-arg constructor. If the implementation class is in
       
    44  * a named module then it should be in an API package that is exported
       
    45  * to the module {@code java.activation}.</p>
       
    46  *
       
    47  * <p>Applications don't generally call the methods in DataContentHandlers
    43  * directly. Instead, an application calls the equivalent methods in
    48  * directly. Instead, an application calls the equivalent methods in
    44  * DataHandler. The DataHandler will attempt to find an appropriate
    49  * DataHandler. The DataHandler will attempt to find an appropriate
    45  * DataContentHandler that corresponds to its MIME type using the
    50  * DataContentHandler that corresponds to its MIME type using the
    46  * current DataContentHandlerFactory. The DataHandler then calls
    51  * current DataContentHandlerFactory. The DataHandler then calls
    47  * through to the methods in the DataContentHandler.
    52  * through to the methods in the DataContentHandler.</p>
    48  *
    53  *
    49  * @since 1.6
    54  * @since 1.6
    50  */
    55  */
    51 
    56 
    52 public interface DataContentHandler {
    57 public interface DataContentHandler {