Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,12 @@ private static int utf8MultibyteCharacterSize(byte firstByte)
*/
public boolean hasNext()
throws IOException
{
return ensureBuffer();
}

private boolean ensureBuffer()
throws IOException
{
while (buffer.size() <= position) {
MessageBuffer next = in.next();
Expand Down Expand Up @@ -290,7 +296,7 @@ public MessageFormat getNextFormat()
throws IOException
{
// makes sure that buffer has at leat 1 byte
if (!hasNext()) {
if (!ensureBuffer()) {
throw new MessageInsufficientBufferException();
}
byte b = buffer.getByte(position);
Expand Down