
co.nstant.in.cbor.encoder.UnsignedIntegerEncoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cbor Show documentation
Show all versions of cbor Show documentation
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