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

io.qt.core.QCborStreamReader Maven / Gradle / Ivy

There is a newer version: 6.8.0
Show newest version
package io.qt.core;

import io.qt.*;


/**
 * 

Simple CBOR stream decoder, operating on either a QByteArray or QIODevice

*

Java wrapper for Qt class QCborStreamReader

*/ public class QCborStreamReader extends QtObject { static { QtJambi_LibraryUtilities.initialize(); } @QtPropertyMember(enabled=false) private Object __rcDevice = null; /** * This variable stores the meta-object for the class. */ public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QCborStreamReader.class); /** *

Java wrapper for Qt enum QCborStreamReader::StringResultCode

*/ public enum StringResultCode implements QtEnumerator { /** *

Representing QCborStreamReader::EndOfString

*/ EndOfString(0), /** *

Representing QCborStreamReader::Ok

*/ Ok(1), /** *

Representing QCborStreamReader::Error

*/ Error(-1); static { QtJambi_LibraryUtilities.initialize(); } private StringResultCode(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull StringResultCode resolve(int value) { switch (value) { case 0: return EndOfString; case 1: return Ok; case -1: return Error; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QCborStreamReader::Type

*/ @QtRejectedEntries({"ByteString", "TextString", "HalfFloat"}) public enum Type implements QtByteEnumerator { /** *

Representing QCborStreamReader::UnsignedInteger

*/ UnsignedInteger((byte)0), /** *

Representing QCborStreamReader::NegativeInteger

*/ NegativeInteger((byte)32), /** *

Representing QCborStreamReader::ByteString

*/ ByteString((byte)64), /** *

Representing QCborStreamReader::ByteArray

*/ ByteArray((byte)64), /** *

Representing QCborStreamReader::TextString

*/ TextString((byte)96), /** *

Representing QCborStreamReader::String

*/ String((byte)96), /** *

Representing QCborStreamReader::Array

*/ Array((byte)-128), /** *

Representing QCborStreamReader::Map

*/ Map((byte)-96), /** *

Representing QCborStreamReader::Tag

*/ Tag((byte)-64), /** *

Representing QCborStreamReader::SimpleType

*/ SimpleType((byte)-32), /** *

Representing QCborStreamReader::HalfFloat

*/ HalfFloat((byte)-7), /** *

Representing QCborStreamReader::Float16

*/ Float16((byte)-7), /** *

Representing QCborStreamReader::Float

*/ Float((byte)-6), /** *

Representing QCborStreamReader::Double

*/ Double((byte)-5), /** *

Representing QCborStreamReader::Invalid

*/ Invalid((byte)-1); static { QtJambi_LibraryUtilities.initialize(); } private Type(byte value) { this.value = value; } /** * {@inheritDoc} */ public byte value() { return value; } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull Type resolve(byte value) { switch (value) { case 0: return UnsignedInteger; case 32: return NegativeInteger; case 64: return ByteArray; case 96: return String; case -128: return Array; case -96: return Map; case -64: return Tag; case -32: return SimpleType; case -7: return Float16; case -6: return Float; case -5: return Double; case -1: return Invalid; default: throw new QNoSuchEnumValueException(value); } } private final byte value; } /** *

Java wrapper for Qt class QCborStreamReader::StringResult<QVariant>

*/ public static final class StringResult extends QtObject implements java.lang.Cloneable { static { QtJambi_LibraryUtilities.initialize(); } /** *

See QCborStreamReader::StringResult<QVariant>::data

*/ @QtUninvokable public final void setData(@NonNull Container data){ setData_native_cref_QVariant(QtJambi_LibraryUtilities.internal.nativeId(this), data); } @QtUninvokable private native void setData_native_cref_QVariant(long __this__nativeId, Container data); /** *

See QCborStreamReader::StringResult<QVariant>::data

*/ @QtUninvokable public final @NonNull Container data(){ return data_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native Container data_native(long __this__nativeId); /** *

See QCborStreamReader::StringResult<QVariant>::status

*/ @QtUninvokable public final void setStatus(io.qt.core.QCborStreamReader.@NonNull StringResultCode status){ setStatus_native_cref_QCborStreamReader_StringResultCode(QtJambi_LibraryUtilities.internal.nativeId(this), status.value()); } @QtUninvokable private native void setStatus_native_cref_QCborStreamReader_StringResultCode(long __this__nativeId, int status); /** *

See QCborStreamReader::StringResult<QVariant>::status

*/ @QtUninvokable public final io.qt.core.QCborStreamReader.@NonNull StringResultCode status(){ return io.qt.core.QCborStreamReader.StringResultCode.resolve(status_native(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int status_native(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected StringResult(QPrivateConstructor p) { super(p); } /** *

Creates and returns a copy of this object.

See QCborStreamReader::StringResult<QVariant>::StringResult(QCborStreamReader::StringResult<QVariant>)

*/ @QtUninvokable @Override public StringResult clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private static native StringResult clone_native(long __this_nativeId); /** * @hidden *

Kotlin property getter. In Java use {@link #data()} instead.

*/ @QtUninvokable public final @NonNull Container getData() { return data(); } /** * @hidden *

Kotlin property getter. In Java use {@link #status()} instead.

*/ @QtUninvokable public final io.qt.core.QCborStreamReader.@NonNull StringResultCode getStatus() { return status(); } } /** *

See QCborStreamReader::QCborStreamReader()

*/ public QCborStreamReader(){ super((QPrivateConstructor)null); initialize_native(this); } private native static void initialize_native(QCborStreamReader instance); /** *

See QCborStreamReader::QCborStreamReader(QByteArray)

*/ public QCborStreamReader(io.qt.core.@NonNull QByteArray data){ super((QPrivateConstructor)null); initialize_native(this, data); } private native static void initialize_native(QCborStreamReader instance, io.qt.core.QByteArray data); /** *

See QCborStreamReader::QCborStreamReader(QIODevice*)

*/ public QCborStreamReader(io.qt.core.@Nullable QIODevice device){ super((QPrivateConstructor)null); initialize_native(this, device); __rcDevice = device; } private native static void initialize_native(QCborStreamReader instance, io.qt.core.QIODevice device); /** *

See QCborStreamReader::QCborStreamReader(const char*,qsizetype)

*/ public QCborStreamReader(java.nio.@Nullable ByteBuffer data, long len){ super((QPrivateConstructor)null); if(!data.isDirect()) { throw new IllegalArgumentException("Can only read from direct buffers."); } __rcDevice = data; initialize_native(this, data, len); } private native static void initialize_native(QCborStreamReader instance, java.nio.ByteBuffer data, long len); /** *

See QCborStreamReader::addData(QByteArray)

*/ @QtUninvokable public final void addData(io.qt.core.@NonNull QByteArray data){ addData_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(data)); } @QtUninvokable private native void addData_native_cref_QByteArray(long __this__nativeId, long data); /** *

See QCborStreamReader::addData(const quint8*,qsizetype)

*/ @QtUninvokable public final void addData(java.nio.@Nullable ByteBuffer data, long len){ if(!data.isDirect()) { throw new IllegalArgumentException("Can only read from direct buffers."); } __rcDevice = new QPair<>(__rcDevice, data); addData_native_const_quint8_ptr_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), data, len); } @QtUninvokable private native void addData_native_const_quint8_ptr_qsizetype(long __this__nativeId, java.nio.ByteBuffer data, long len); /** *

See QCborStreamReader::clear()

*/ @QtUninvokable public final void clear(){ clear_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native void clear_native(long __this__nativeId); /** *

See QCborStreamReader::containerDepth()const

*/ @QtUninvokable public final int containerDepth(){ return containerDepth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int containerDepth_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::currentOffset()const

*/ @QtUninvokable public final long currentOffset(){ return currentOffset_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native long currentOffset_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::currentStringChunkSize()const

*/ @QtUninvokable public final long currentStringChunkSize(){ return currentStringChunkSize_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native long currentStringChunkSize_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::device()const

*/ @QtUninvokable public final io.qt.core.@Nullable QIODevice device(){ return device_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QIODevice device_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::enterContainer()

*/ @QtUninvokable public final boolean enterContainer(){ return enterContainer_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean enterContainer_native(long __this__nativeId); /** *

See QCborStreamReader::hasNext()const

*/ @QtUninvokable public final boolean hasNext(){ return hasNext_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean hasNext_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isArray()const

*/ @QtUninvokable public final boolean isArray(){ return isArray_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isArray_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isBool()const

*/ @QtUninvokable public final boolean isBoolean(){ return isBoolean_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isBoolean_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isByteArray()const

*/ @QtUninvokable public final boolean isByteArray(){ return isByteArray_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isByteArray_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isContainer()const

*/ @QtUninvokable public final boolean isContainer(){ return isContainer_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isContainer_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isDouble()const

*/ @QtUninvokable public final boolean isDouble(){ return isDouble_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isDouble_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isFalse()const

*/ @QtUninvokable public final boolean isFalse(){ return isFalse_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isFalse_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isFloat()const

*/ @QtUninvokable public final boolean isFloat(){ return isFloat_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isFloat_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isInteger()const

*/ @QtUninvokable public final boolean isInteger(){ return isInteger_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isInteger_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isInvalid()const

*/ @QtUninvokable public final boolean isInvalid(){ return isInvalid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isInvalid_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isLengthKnown()const

*/ @QtUninvokable public final boolean isLengthKnown(){ return isLengthKnown_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isLengthKnown_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isMap()const

*/ @QtUninvokable public final boolean isMap(){ return isMap_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isMap_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isNull()const

*/ @QtUninvokable public final boolean isNull(){ return isNull_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isNull_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isSimpleType()const

*/ @QtUninvokable public final boolean isSimpleType(){ return isSimpleType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isSimpleType_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isSimpleType(QCborSimpleType)const

*/ @QtUninvokable public final boolean isSimpleType(io.qt.core.@NonNull QCborSimpleType st){ return isSimpleType_native_QCborSimpleType_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), st.value()); } @QtUninvokable private native boolean isSimpleType_native_QCborSimpleType_constfct(long __this__nativeId, byte st); /** *

See QCborStreamReader::isString()const

*/ @QtUninvokable public final boolean isString(){ return isString_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isString_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isTag()const

*/ @QtUninvokable public final boolean isTag(){ return isTag_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isTag_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isTrue()const

*/ @QtUninvokable public final boolean isTrue(){ return isTrue_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isTrue_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isUndefined()const

*/ @QtUninvokable public final boolean isUndefined(){ return isUndefined_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isUndefined_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isUnsignedInteger()const

*/ @QtUninvokable public final boolean isBigInteger(){ return isBigInteger_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isBigInteger_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::isValid()const

*/ @QtUninvokable public final boolean isValid(){ return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isValid_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::lastError()

*/ @QtUninvokable public final io.qt.core.@NonNull QCborError lastError(){ return lastError_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QCborError lastError_native(long __this__nativeId); /** *

See QCborStreamReader::leaveContainer()

*/ @QtUninvokable public final boolean leaveContainer(){ return leaveContainer_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean leaveContainer_native(long __this__nativeId); /** *

See QCborStreamReader::length()const

*/ @QtUninvokable public final long length(){ return length_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native long length_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::next(int)

*/ @QtUninvokable public final boolean next(int maxRecursion){ return next_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), maxRecursion); } @QtUninvokable private native boolean next_native_int(long __this__nativeId, int maxRecursion); /** *

See QCborStreamReader::parentContainerType()const

*/ @QtUninvokable public final io.qt.core.QCborStreamReader.@NonNull Type parentContainerType(){ return io.qt.core.QCborStreamReader.Type.resolve(parentContainerType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native byte parentContainerType_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::readByteArray()

*/ @QtUninvokable public final io.qt.core.QCborStreamReader.@NonNull StringResult readByteArray(){ return readByteArray_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QCborStreamReader.StringResult readByteArray_native(long __this__nativeId); /** *

See QCborStreamReader::readString()

*/ @QtUninvokable public final io.qt.core.QCborStreamReader.@NonNull StringResult readString(){ return readString_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QCborStreamReader.StringResult readString_native(long __this__nativeId); /** *

See QCborStreamReader::readStringChunk(char*,qsizetype)

*/ @QtUninvokable public final io.qt.core.QCborStreamReader.@NonNull StringResult readStringChunk(java.nio.@Nullable ByteBuffer ptr, long maxlen){ if(!ptr.isDirect()) { throw new IllegalArgumentException("Can only read from direct buffers."); } return readStringChunk_native_char_ptr_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), ptr, maxlen); } @QtUninvokable private native io.qt.core.QCborStreamReader.StringResult readStringChunk_native_char_ptr_qsizetype(long __this__nativeId, java.nio.ByteBuffer ptr, long maxlen); /** *

See QCborStreamReader::reparse()

*/ @QtUninvokable public final void reparse(){ reparse_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native void reparse_native(long __this__nativeId); /** *

See QCborStreamReader::reset()

*/ @QtUninvokable public final void reset(){ reset_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native void reset_native(long __this__nativeId); /** *

See QCborStreamReader::setDevice(QIODevice*)

*/ @QtUninvokable public final void setDevice(io.qt.core.@Nullable QIODevice device){ setDevice_native_QIODevice_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(device)); __rcDevice = device; } @QtUninvokable private native void setDevice_native_QIODevice_ptr(long __this__nativeId, long device); /** *

See QCborStreamReader::toBool()const

*/ @QtUninvokable public final boolean toBoolean(){ return toBoolean_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean toBoolean_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::toDouble()const

*/ @QtUninvokable public final double toDouble(){ return toDouble_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native double toDouble_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::toFloat()const

*/ @QtUninvokable public final float toFloat(){ return toFloat_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native float toFloat_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::toInteger()const

*/ @QtUninvokable public final long toInteger(){ return toInteger_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native long toInteger_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::toSimpleType()const

*/ @QtUninvokable public final io.qt.core.@NonNull QCborSimpleType toSimpleType(){ return io.qt.core.QCborSimpleType.resolve(toSimpleType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native byte toSimpleType_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::toTag()const

*/ @QtUninvokable public final io.qt.core.@NonNull QCborTag toTag(){ return io.qt.core.QCborTag.resolve(toTag_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native long toTag_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::toUnsignedInteger()const

*/ @QtUninvokable public final java.math.@StrictNonNull BigInteger toBigInteger(){ return toBigInteger_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native java.math.BigInteger toBigInteger_native_constfct(long __this__nativeId); /** *

See QCborStreamReader::type()const

*/ @QtUninvokable public final io.qt.core.QCborStreamReader.@NonNull Type type(){ return io.qt.core.QCborStreamReader.Type.resolve(type_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native byte type_native_constfct(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QCborStreamReader(QPrivateConstructor p) { super(p); } /** *

Overloaded constructor for {@link #QCborStreamReader(io.qt.core.QByteArray)}.

*/ public QCborStreamReader(byte @NonNull[] data) { this(new io.qt.core.QByteArray(data)); } /** *

Overloaded function for {@link #addData(io.qt.core.QByteArray)}.

*/ @QtUninvokable public final void addData(byte @NonNull[] data) { addData(new io.qt.core.QByteArray(data)); } /** *

Overloaded function for {@link #next(int)} * with maxRecursion = 10000.

*/ @QtUninvokable public final boolean next() { return next((int)10000); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy