Class InputStreamMarker


  • public class InputStreamMarker
    extends java.lang.Object
    Allows the position of an input stream to be marked and reset. This class provides an abstraction that can be mapped to the different ways of doing this on Java and .NET
    • Constructor Summary

      Constructors 
      Constructor Description
      InputStreamMarker​(java.io.InputStream stream)
      Create an InputStreamMarker for a supplied input stream
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.io.InputStream ensureMarkSupported​(java.io.InputStream stream)
      Return this stream if its position can be marked, or an enclosing Stream if not
      boolean isMarkSupported()  
      void mark​(int readLimit)  
      void reset()  
      • Methods inherited from class java.lang.Object

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

      • InputStreamMarker

        public InputStreamMarker​(java.io.InputStream stream)
        Create an InputStreamMarker for a supplied input stream
        Parameters:
        stream - the supplied input stream
    • Method Detail

      • ensureMarkSupported

        public static java.io.InputStream ensureMarkSupported​(java.io.InputStream stream)
        Return this stream if its position can be marked, or an enclosing Stream if not
        Parameters:
        stream - the supplied stream
        Returns:
        either this stream if it is markable, or an equivalent markable stream if not
      • isMarkSupported

        public boolean isMarkSupported()
      • mark

        public void mark​(int readLimit)
      • reset

        public void reset()
                   throws java.io.IOException
        Throws:
        java.io.IOException