Class CBORTokenizer

java.lang.Object
com.authlete.cbor.token.CBORTokenizer

public class CBORTokenizer extends Object
A tokenizer that tokenizes the content of an input stream of CBOR data items so that the CBOR decoder (CBORDecoder) can construct CBOR data items (CBORItem).
  • Constructor Details

    • CBORTokenizer

      public CBORTokenizer(InputStream inputStream)
      A constructor with an input stream of CBOR data items.
      Parameters:
      inputStream - An input stream to read CBOR data items from.
  • Method Details

    • getReadCount

      public int getReadCount()
      Get the number of bytes read from the input stream so far.
      Returns:
      The number of bytes from the input stream so far.
    • next

      public CBORToken<?> next() throws IOException
      Get the next CBOR token from the input stream.
      Returns:
      A CBOR token. When no more CBOR token is available, null is returned.
      Throws:
      IOException