Class PeekAheadInputStream

  • All Implemented Interfaces:
    Closeable, 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 Detail

      • PeekAheadInputStream

        public PeekAheadInputStream​(InputStream in)
        Deprecated.
      • PeekAheadInputStream

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

      • peek

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

        public int peek​(byte[] buf)
                 throws 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:
        IOException
      • peek

        public int peek​(byte[] buf,
                        int off,
                        int len)
                 throws 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:
        IOException