code: public MessageFormat getNextFormat()
              throws IOException
      {
          // makes sure that buffer has at least 1 byte
          if (!ensureBuffer()) {
              throw new MessageInsufficientBufferException();
          }
          byte b = buffer.getByte(position);
          return MessageFormat.valueOf(b);
      }
docs: Returns format of the next value.
  
  <p>
  Note that this method doesn't consume data from the internal buffer unlike the other unpack methods.
  Calling this method twice will return the same value.
  
  <p>
  To not throw {@link MessageInsufficientBufferException}, this method should be called only when
  {@link #hasNext()} returns true.
  
  @return the next MessageFormat
  @throws IOException when underlying input throws IOException
  @throws MessageInsufficientBufferException when the end of file reached, i.e. {@link #hasNext()} == false.