All Downloads are FREE. Search and download functionalities are using the official Maven repository.

co.nstant.in.cbor.encoder.UnsignedIntegerEncoder Maven / Gradle / Ivy

Go to download

Java implementation of RFC 7049: Concise Binary Object Representation (CBOR)

The newest version!
package co.nstant.in.cbor.encoder;

import java.io.OutputStream;

import co.nstant.in.cbor.CborEncoder;
import co.nstant.in.cbor.CborException;
import co.nstant.in.cbor.model.MajorType;
import co.nstant.in.cbor.model.UnsignedInteger;

public class UnsignedIntegerEncoder extends AbstractEncoder {

    public UnsignedIntegerEncoder(CborEncoder encoder, OutputStream outputStream) {
        super(encoder, outputStream);
    }

    @Override
    public void encode(UnsignedInteger dataItem) throws CborException {
        encodeTypeAndLength(MajorType.UNSIGNED_INTEGER, dataItem.getValue());
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy