Class ByteArraySource

  • All Implemented Interfaces:
    javax.xml.transform.Source

    public class ByteArraySource
    extends javax.xml.transform.stream.StreamSource
    INTERNAL:

    Purpose: Provides an implementation of Source that can act on a byte[]. Overrides the getInputStream and getReader methods to ensure a new stream is created each time (to prevent the one use restriction of StreamSource).

    Author:
    mmacivor
    • Field Summary

      • Fields inherited from class javax.xml.transform.stream.StreamSource

        FEATURE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream getInputStream()  
      java.io.Reader getReader()  
      • Methods inherited from class javax.xml.transform.stream.StreamSource

        getPublicId, getSystemId, isEmpty, setInputStream, setPublicId, setReader, setSystemId, setSystemId
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ByteArraySource

        public ByteArraySource​(byte[] bytes)
      • ByteArraySource

        public ByteArraySource​(byte[] bytes,
                               java.lang.String mimeType)
    • Method Detail

      • getInputStream

        public java.io.InputStream getInputStream()
        Overrides:
        getInputStream in class javax.xml.transform.stream.StreamSource
      • getReader

        public java.io.Reader getReader()
        Overrides:
        getReader in class javax.xml.transform.stream.StreamSource