Usually shouldn't be implemented directly. Inherit Input instead.
Discards exactly n bytes or fails with EOFException
Try to copy at least min but up to max bytes to the specified destination buffer from this input skipping offset bytes. If there are not enough bytes available to provide min bytes after skipping offset bytes then it will trigger the underlying source reading first and after that will simply copy available bytes even if EOF encountered so min is not a requirement but a desired number of bytes. It is safe to specify max greater than the destination free space.
min shouldn't be bigger than the destination free space. This function could trigger the underlying source reading that may lead to blocking I/O. It is allowed to specify too big offset so in this case this function will always return
0 after prefetching all underlying bytes but note that it may lead to significant memory consumption. This function usually copy more bytes than min (unless
max = min) but it is not guaranteed. When
0 is returned with
offset = 0 then it makes sense to check endOfInput.
Read a string exactly exactCharacters length
Read exactly exactCharacters characters and append them to out
Release packet. After this function invocation the packet becomes empty. If it has been copied via ByteReadPacket.copy then the copy should be released as well.
Copy all bytes to the output. Depending on actual input and output implementation it could be zero-copy or copy byte per byte. All regular types such as ByteReadPacket, BytePacketBuilder, Input and Output are always optimized so no bytes will be copied.
Discard exactly n bytes or fail if not enough bytes in the input to be discarded.
Discards bytes until delimiter occurred
Discards bytes until of of the specified delimiters delimiter1 or delimiter2 occurred
For streaming input it should be Input.endOfInput instead.
For streaming input there is no reliable way to detect it without triggering bytes population from the underlying source. Consider using Input.endOfInput or use ByteReadPacket instead.
Reads at most max characters decoding bytes with specified charset. Extra character bytes will remain unconsumed
Read exactly the specified number of bytes interpreting bytes in the specified charset (optional, UTF-8 by default).
Read exactly bytesCount interpreting bytes in the specified charset (optional, UTF-8 by default).
Read exactly charactersCount characters interpreting bytes in the specified charset.
Copies to dst array at offset at most length bytes or until one of the specified delimiters delimiter1 or delimiter2 occurred.
Copies to dst output until one of the specified delimiters delimiter1 or delimiter2 occurred.
Reads UTF-8 line and append all line characters to out except line endings. Supports CR, LF and CR+LF
Reads UTF-8 characters until one of the specified delimiters found, limit exceeded or end of stream encountered
Reads UTF-8 characters to out buffer until one of the specified delimiters found, limit exceeded or end of stream encountered