< prev index next >

src/java.xml/share/classes/javax/xml/transform/stream/StreamSource.java

Print this page




  23  * questions.
  24  */
  25 
  26 package javax.xml.transform.stream;
  27 
  28 import java.io.File;
  29 import java.io.IOException;
  30 import java.io.InputStream;
  31 import java.io.Reader;
  32 import javax.xml.transform.Result;
  33 
  34 import javax.xml.transform.Source;
  35 
  36 /**
  37  * <p>Acts as an holder for a transformation Source in the form
  38  * of a stream of XML markup.</p>
  39  *
  40  * <p><em>Note:</em> Due to their internal use of either a {@link Reader} or {@link InputStream} instance,
  41  * <code>StreamSource</code> instances may only be used once.</p>
  42  *
  43  * @author <a href="Jeff.Suttor@Sun.com">Jeff Suttor</a>
  44  * @since 1.4
  45  */
  46 public class StreamSource implements Source {
  47 
  48     /** If {@link javax.xml.transform.TransformerFactory#getFeature}
  49      * returns true when passed this value as an argument,
  50      * the Transformer supports Source input of this type.
  51      */
  52     public static final String FEATURE =
  53         "http://javax.xml.transform.stream.StreamSource/feature";
  54 
  55     /**
  56      * <p>Zero-argument default constructor.  If this constructor is used, and
  57      * no Stream source is set using
  58      * {@link #setInputStream(java.io.InputStream inputStream)} or
  59      * {@link #setReader(java.io.Reader reader)}, then the
  60      * <code>Transformer</code> will
  61      * create an empty source {@link java.io.InputStream} using
  62      * {@link java.io.InputStream#InputStream() new InputStream()}.</p>
  63      *




  23  * questions.
  24  */
  25 
  26 package javax.xml.transform.stream;
  27 
  28 import java.io.File;
  29 import java.io.IOException;
  30 import java.io.InputStream;
  31 import java.io.Reader;
  32 import javax.xml.transform.Result;
  33 
  34 import javax.xml.transform.Source;
  35 
  36 /**
  37  * <p>Acts as an holder for a transformation Source in the form
  38  * of a stream of XML markup.</p>
  39  *
  40  * <p><em>Note:</em> Due to their internal use of either a {@link Reader} or {@link InputStream} instance,
  41  * <code>StreamSource</code> instances may only be used once.</p>
  42  *
  43  * @author Jeff Suttor
  44  * @since 1.4
  45  */
  46 public class StreamSource implements Source {
  47 
  48     /** If {@link javax.xml.transform.TransformerFactory#getFeature}
  49      * returns true when passed this value as an argument,
  50      * the Transformer supports Source input of this type.
  51      */
  52     public static final String FEATURE =
  53         "http://javax.xml.transform.stream.StreamSource/feature";
  54 
  55     /**
  56      * <p>Zero-argument default constructor.  If this constructor is used, and
  57      * no Stream source is set using
  58      * {@link #setInputStream(java.io.InputStream inputStream)} or
  59      * {@link #setReader(java.io.Reader reader)}, then the
  60      * <code>Transformer</code> will
  61      * create an empty source {@link java.io.InputStream} using
  62      * {@link java.io.InputStream#InputStream() new InputStream()}.</p>
  63      *


< prev index next >