Class SimpleBufferedInput

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.jsoup.internal.SimpleBufferedInput
All Implemented Interfaces:
Closeable, AutoCloseable

class SimpleBufferedInput extends FilterInputStream
A simple implementation of a buffered input stream, in which we can control the byte[] buffer to recycle it. Not safe for use between threads; no sync or locks. The buffer is borrowed on initial demand in fill.
Since:
1.18.2
  • Field Details

    • BufferSize

      static final int BufferSize
      See Also:
    • BufferPool

      static final SoftPool<byte[]> BufferPool
    • capRemaining

      private int capRemaining
    • byteBuf

      private byte[] byteBuf
    • bufPos

      private int bufPos
    • bufLength

      private int bufLength
    • bufMark

      private int bufMark
    • inReadFully

      private boolean inReadFully
  • Constructor Details

    • SimpleBufferedInput

      SimpleBufferedInput(InputStream in)
  • Method Details