Class NoCloseInputStream

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

    public class NoCloseInputStream
    extends java.io.PushbackInputStream
    Intercepts the close call so we can process the stream using the FHIR resource parser
    • Field Summary

      • Fields inherited from class java.io.PushbackInputStream

        buf, pos
      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      NoCloseInputStream​(java.io.InputStream delegate)
      Public Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      • Methods inherited from class java.io.PushbackInputStream

        available, mark, markSupported, read, read, reset, skip, unread, unread, unread
      • Methods inherited from class java.io.FilterInputStream

        read
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

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

      • NoCloseInputStream

        public NoCloseInputStream​(java.io.InputStream delegate)
        Public Constructor
        Parameters:
        delegate - the delegate stream we are decorating
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.PushbackInputStream
        Throws:
        java.io.IOException