Package co.nstant.in.cbor.model

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


            write(length.shiftRight(16).and(mask).intValue());
            write(length.shiftRight(8).and(mask).intValue());
            write(length.and(mask).intValue());
        } else {
            if (negative) {
                encoder.encode(new Tag(3));
            } else {
                encoder.encode(new Tag(2));
            }
            encoder.encode(new ByteString(length.toByteArray()));
        }
    }
View Full Code Here


        super(decoder, inputStream);
    }

    @Override
    public Tag decode(int initialByte) throws CborException {
        return new Tag(getLength(initialByte));
    }
View Full Code Here

  protected DataItem convert(double value) {
    return new DoublePrecisionFloat(value);
  }

  protected Tag tag(long value) {
    return new Tag(value);
  }
View Full Code Here

    super(encoder, outputStream);
  }

  @Override
  public void encode(RationalNumber rationalNumber) throws CborException {
    encoder.encode(new Tag(30));
    encoder.encode(new Array().add(rationalNumber.getNumerator()).add(rationalNumber.getDennominator()));
  }
View Full Code Here

      write(length.shiftRight(16).and(mask).intValue());
      write(length.shiftRight(8).and(mask).intValue());
      write(length.and(mask).intValue());
    } else {
      if (negative) {
        encoder.encode(new Tag(3));
      } else {
        encoder.encode(new Tag(2));
      }
      encoder.encode(new ByteString(length.toByteArray()));
    }
  }
View Full Code Here

TOP

Related Classes of co.nstant.in.cbor.model.Tag

Copyright © 2018 www.massapicom. 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.