Class PeekAheadInputStream

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

    @Deprecated(since="2021-07-29")
    public class PeekAheadInputStream
    extends RewindableInputStream
    Deprecated.
    This API is deprecated as Apache Abdera is a retired project since 2017.
    A version of RewindableInputStream that provides methods for peeking ahead in the stream (equivalent to read() followed by an appropriate unread()
    • Constructor Summary

      Constructors 
      Constructor Description
      PeekAheadInputStream​(java.io.InputStream in)
      Deprecated.
       
      PeekAheadInputStream​(java.io.InputStream in, int initialSize)
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      int peek()
      Deprecated.
      Peek the next byte in the stream
      int peek​(byte[] buf)
      Deprecated.
      Peek the next bytes in the stream.
      int peek​(byte[] buf, int off, int len)
      Deprecated.
      Peek the next bytes in the stream.
      • Methods inherited from class java.io.PushbackInputStream

        available, close, mark, markSupported, reset, 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

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

      • PeekAheadInputStream

        public PeekAheadInputStream​(java.io.InputStream in)
        Deprecated.
      • PeekAheadInputStream

        public PeekAheadInputStream​(java.io.InputStream in,
                                    int initialSize)
        Deprecated.
    • Method Detail

      • peek

        public int peek()
                 throws java.io.IOException
        Deprecated.
        Peek the next byte in the stream
        Throws:
        java.io.IOException
      • peek

        public int peek​(byte[] buf)
                 throws java.io.IOException
        Deprecated.
        Peek the next bytes in the stream. Returns the number of bytes peeked. Will return -1 if the end of the stream is reached
        Throws:
        java.io.IOException
      • peek

        public int peek​(byte[] buf,
                        int off,
                        int len)
                 throws java.io.IOException
        Deprecated.
        Peek the next bytes in the stream. Returns the number of bytes peeked. Will return -1 if the end of the stream is reached
        Throws:
        java.io.IOException