RecyclableBufferedInputStream
Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input stream is minimized, since most (smaller) requests can be satisfied by accessing the buffer alone. The drawback is that some extra space is required to hold the buffer and that copying takes place when filling that buffer, but this is usually outweighed by the performance benefits.
A typical application pattern for the class looks like this:
BufferedInputStream buf = new BufferedInputStream(new FileInputStream("file.java"));
Content copied to clipboard
Constructors
Link copied to clipboard
open fun RecyclableBufferedInputStream(in: InputStream, byteArrayPool: ArrayPool)
Content copied to clipboard
Functions
Link copied to clipboard
Reduces the mark limit to match the current buffer length to prevent the buffer from continuing to increase in size.
Link copied to clipboard
Indicates whether
BufferedInputStream
supports the mark and reset methods.Link copied to clipboard
Link copied to clipboard
Reads a single byte from this stream and returns it as an integer in the range from 0 to 255.
Reads at most
byteCount
bytes from this stream and stores them in byte array
buffer
starting at offset offset
.Link copied to clipboard
Link copied to clipboard
Link copied to clipboard