Examples of DataItem


Examples of co.nstant.in.cbor.model.DataItem

   * @throws CborException
   *             if decoding failed
   */
  public List<DataItem> decode() throws CborException {
    List<DataItem> dataItems = new LinkedList<>();
    DataItem dataItem;
    while ((dataItem = decodeNext()) != null) {
      dataItems.add(dataItem);
    }
    return dataItems;
  }
View Full Code Here

Examples of co.nstant.in.cbor.model.DataItem

   * @throws CborException
   *             if decoding failed
   */
  public void decode(DataItemListener dataItemListener) throws CborException {
    Objects.requireNonNull(dataItemListener);
    DataItem dataItem = decodeNext();
    while (dataItem != null) {
      dataItemListener.onDataItem(dataItem);
      dataItem = decodeNext();
    }
  }
View Full Code Here

Examples of co.nstant.in.cbor.model.DataItem

        }
    }

    private UnicodeString decodeInfinitiveLength() throws CborException {
        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
        DataItem dataItem;
        for (;;) {
            dataItem = decoder.decodeNext();
            MajorType majorType = dataItem.getMajorType();
            if (Special.BREAK.equals(dataItem)) {
                break;
            } else if (majorType == MajorType.UNICODE_STRING) {
                UnicodeString unicodeString = (UnicodeString) dataItem;
                try {
View Full Code Here

Examples of co.nstant.in.cbor.model.DataItem

        }
    }

    private ByteString decodeInfinitiveLength() throws CborException {
        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
        DataItem dataItem;
        for (;;) {
            dataItem = decoder.decodeNext();
            MajorType majorType = dataItem.getMajorType();
            if (Special.BREAK.equals(dataItem)) {
                break;
            } else if (majorType == MajorType.BYTE_STRING) {
                ByteString byteString = (ByteString) dataItem;
                try {
View Full Code Here

Examples of co.nstant.in.cbor.model.DataItem

    private Array decodeInfinitiveLength() throws CborException {
        Array array = new Array();
        array.setChunked(true);
        if (decoder.isAutoDecodeInfinitiveArrays()) {
            DataItem dataItem;
            for (;;) {
                dataItem = decoder.decodeNext();
                if (dataItem == null) {
                    throw new CborException("Unexpected end of stream");
                }
View Full Code Here

Examples of co.nstant.in.cbor.model.DataItem

    }

    private Array decodeFixedLength(long length) throws CborException {
        Array array = new Array();
        for (long i = 0; i < length; i++) {
            DataItem dataItem = decoder.decodeNext();
            if (dataItem == null) {
                throw new CborException("Unexpected end of stream");
            }
            array.add(dataItem);
        }
View Full Code Here

Examples of co.nstant.in.cbor.model.DataItem

    private Map decodeInfinitiveLength() throws CborException {
        Map map = new Map();
        map.setChunked(true);
        if (decoder.isAutoDecodeInfinitiveMaps()) {
            for (;;) {
                DataItem key = decoder.decodeNext();
                if (Special.BREAK.equals(key)) {
                    break;
                }
                map.put(key, decoder.decodeNext());
            }
View Full Code Here

Examples of co.nstant.in.cbor.model.DataItem

  private Map decodeInfinitiveLength() throws CborException {
    Map map = new Map();
    map.setChunked(true);
    if (decoder.isAutoDecodeInfinitiveMaps()) {
      for (;;) {
        DataItem key = decoder.decodeNext();
        if (Special.BREAK.equals(key)) {
          break;
        }
        map.put(key, decoder.decodeNext());
      }
View Full Code Here

Examples of co.nstant.in.cbor.model.DataItem

    }
  }

  private UnicodeString decodeInfinitiveLength() throws CborException {
    ByteArrayOutputStream bytes = new ByteArrayOutputStream();
    DataItem dataItem;
    for (;;) {
      dataItem = decoder.decodeNext();
      MajorType majorType = dataItem.getMajorType();
      if (Special.BREAK.equals(dataItem)) {
        break;
      } else if (majorType == MajorType.UNICODE_STRING) {
        UnicodeString unicodeString = (UnicodeString) dataItem;
        try {
View Full Code Here

Examples of com.caucho.relaxng.program.DataItem

   * Creates the program (somewhat bogus)
   */
  public Item createItem(GrammarPattern grammar)
    throws RelaxException
  {
    return new DataItem(_type);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.