Class PrefixInputStream

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

    public class PrefixInputStream
    extends java.io.FilterInputStream
    stream class that allows allows prefixing of a stream without requiring a copy
    • Field Summary

      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      PrefixInputStream​(java.io.InputStream stream1, java.io.InputStream stream2)  
      PrefixInputStream​(java.lang.String prefix, java.io.InputStream stream2)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void mark​(int readlimit)  
      int read()  
      int read​(byte[] b)  
      int read​(byte[] b, int off, int len)  
      void reset()  
      java.lang.String toString()  
      • Methods inherited from class java.io.FilterInputStream

        available, close, markSupported, skip
      • Methods inherited from class java.io.InputStream

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

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

      • PrefixInputStream

        public PrefixInputStream​(java.io.InputStream stream1,
                                 java.io.InputStream stream2)
        Parameters:
        stream1 -
        stream2 -
      • PrefixInputStream

        public PrefixInputStream​(java.lang.String prefix,
                                 java.io.InputStream stream2)
        Parameters:
        prefix -
        stream2 -
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
        See Also:
        FilterInputStream.read()
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
        See Also:
        FilterInputStream.read(byte[], int, int)
      • read

        public int read​(byte[] b)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
        See Also:
        FilterInputStream.read(byte[])
      • mark

        public void mark​(int readlimit)
        Overrides:
        mark in class java.io.FilterInputStream
        See Also:
        FilterInputStream.mark(int)
      • reset

        public void reset()
                   throws java.io.IOException
        Overrides:
        reset in class java.io.FilterInputStream
        Throws:
        java.io.IOException
        See Also:
        FilterInputStream.reset()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()