io.qt.core.QBuffer Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.core;
import io.qt.*;
/**
* QIODevice interface for a QByteArray
* Java wrapper for Qt class QBuffer
*/
public class QBuffer extends io.qt.core.QIODevice
{
@QtPropertyMember(enabled=false)
private Object strongDataReference = null;
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QBuffer.class);
/**
* See QBuffer:: QBuffer(QByteArray*, QObject*)
*/
public QBuffer(io.qt.core.@Nullable QByteArray buf, io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, buf, parent);
strongDataReference = buf;
}
private native static void initialize_native(QBuffer instance, io.qt.core.QByteArray buf, io.qt.core.QObject parent);
/**
* See QBuffer:: QBuffer(QObject*)
*/
public QBuffer(io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QBuffer instance, io.qt.core.QObject parent);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QByteArray buffer(){
return buffer_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QByteArray buffer_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QByteArray data(){
return data_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QByteArray data_native_constfct(long __this__nativeId);
/**
* See QBuffer:: setBuffer(QByteArray*)
*/
@QtUninvokable
public final void setBuffer(io.qt.core.@Nullable QByteArray a){
setBuffer_native_QByteArray_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(a));
strongDataReference = a;
}
@QtUninvokable
private native void setBuffer_native_QByteArray_ptr(long __this__nativeId, long a);
/**
* See QBuffer:: setData(QByteArray)
*/
@QtUninvokable
public final void setData(io.qt.core.@NonNull QByteArray data){
setData_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(data));
}
@QtUninvokable
private native void setData_native_cref_QByteArray(long __this__nativeId, long data);
/**
* See QBuffer:: setData(const char*, qsizetype)
*/
@QtUninvokable
public final void setData(java.nio.@Nullable ByteBuffer data){
setData_native_const_char_ptr_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), data);
}
@QtUninvokable
private native void setData_native_const_char_ptr_qsizetype(long __this__nativeId, java.nio.ByteBuffer data);
/**
*
*/
@QtUninvokable
@Override
public boolean atEnd(){
return atEnd_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean atEnd_native_constfct(long __this__nativeId);
/**
* See QIODevice:: canReadLine()const
*/
@QtUninvokable
@Override
public boolean canReadLine(){
return canReadLine_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean canReadLine_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
@Override
public void close(){
close_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void close_native(long __this__nativeId);
/**
* See QObject:: connectNotify(QMetaMethod)
*/
@QtUninvokable
@Override
protected void connectNotify(io.qt.core.@NonNull QMetaMethod arg__1){
connectNotify_native_cref_QMetaMethod(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void connectNotify_native_cref_QMetaMethod(long __this__nativeId, long arg__1);
/**
* See QObject:: disconnectNotify(QMetaMethod)
*/
@QtUninvokable
@Override
protected void disconnectNotify(io.qt.core.@NonNull QMetaMethod arg__1){
disconnectNotify_native_cref_QMetaMethod(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void disconnectNotify_native_cref_QMetaMethod(long __this__nativeId, long arg__1);
/**
* See QIODevice:: open(QIODeviceBase::OpenMode)
*/
@QtUninvokable
@Override
public boolean open(io.qt.core.QIODeviceBase.@NonNull OpenMode openMode){
return open_native_QIODeviceBase_OpenMode(QtJambi_LibraryUtilities.internal.nativeId(this), openMode.value());
}
@QtUninvokable
private native boolean open_native_QIODeviceBase_OpenMode(long __this__nativeId, int openMode);
/**
*
*/
@QtUninvokable
@Override
public long pos(){
return pos_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native long pos_native_constfct(long __this__nativeId);
/**
* See QIODevice:: readData(char*, qint64)
*/
@QtUninvokable
@Override
protected int readData(java.nio.@Nullable ByteBuffer data){
return readData_native_char_ptr_qint64(QtJambi_LibraryUtilities.internal.nativeId(this), data);
}
@QtUninvokable
private native int readData_native_char_ptr_qint64(long __this__nativeId, java.nio.ByteBuffer data);
/**
*
*/
@QtUninvokable
@Override
public boolean seek(long off){
return seek_native_qint64(QtJambi_LibraryUtilities.internal.nativeId(this), off);
}
@QtUninvokable
private native boolean seek_native_qint64(long __this__nativeId, long off);
/**
*
*/
@QtUninvokable
@Override
public long size(){
return size_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native long size_native_constfct(long __this__nativeId);
/**
* See QIODevice:: writeData(const char*, qint64)
*/
@QtUninvokable
@Override
protected int writeData(java.nio.@Nullable ByteBuffer data){
return writeData_native_const_char_ptr_qint64(QtJambi_LibraryUtilities.internal.nativeId(this), data);
}
@QtUninvokable
private native int writeData_native_const_char_ptr_qint64(long __this__nativeId, java.nio.ByteBuffer data);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QBuffer(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QBuffer(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QBuffer instance, QDeclarativeConstructor constructor);
/**
* Overloaded constructor for {@link #QBuffer(io.qt.core.QByteArray, io.qt.core.QObject)}
* with parent = null
.
*/
public QBuffer(io.qt.core.@Nullable QByteArray buf) {
this(buf, (io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QBuffer(io.qt.core.QObject)}
* with parent = null
.
*/
public QBuffer() {
this((io.qt.core.QObject)null);
}
/**
* Overloaded function for {@link #setData(java.nio.ByteBuffer)}.
*/
@QtUninvokable
public final void setData(byte[] data, int offsetOfData, int len) {
setData(data==null ? null : java.nio.ByteBuffer.wrap(data, offsetOfData, len));
}
/**
* Overloaded function for {@link #setData(java.nio.ByteBuffer)}.
*/
@QtUninvokable
public final void setData(byte[] data) {
setData(data==null ? null : java.nio.ByteBuffer.wrap(data));
}
}