Class FixedDtdInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class FixedDtdInputStream
    extends java.io.InputStream
    Injects a <!DOCTYPE...> declaration into an InputStream if it does not contain one. The input stream should contain XML.
    • Constructor Summary

      Constructors 
      Constructor Description
      FixedDtdInputStream​(@NotNull java.io.InputStream inputStream, @NotNull java.lang.String rootElement, @NotNull java.lang.String systemId)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int read()  
      • Methods inherited from class java.io.InputStream

        available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

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

      • FixedDtdInputStream

        public FixedDtdInputStream​(@NotNull
                                   @NotNull java.io.InputStream inputStream,
                                   @NotNull
                                   @NotNull java.lang.String rootElement,
                                   @NotNull
                                   @NotNull java.lang.String systemId)
        Creates a new instance.
        Parameters:
        inputStream - the input stream to modify
        rootElement - the tag name of the root element in the DOCTYPE declaration
        systemId - the system ID for the DOCTYPE declaration
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException