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

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

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

import io.qt.*;


/**
 * 

Convenient interface for reading and writing text

*

Java wrapper for Qt class QTextStream

*/ public class QTextStream extends QtObject implements io.qt.core.QIODeviceBase, java.lang.Appendable { static { QtJambi_LibraryUtilities.initialize(); } @QtPropertyMember(enabled=false) private Object __rcDevice = null; /** *

Java wrapper for Qt enum QTextStream::FieldAlignment

*/ public enum FieldAlignment implements QtEnumerator { /** *

Representing QTextStream::AlignLeft

*/ AlignLeft(0), /** *

Representing QTextStream::AlignRight

*/ AlignRight(1), /** *

Representing QTextStream::AlignCenter

*/ AlignCenter(2), /** *

Representing QTextStream::AlignAccountingStyle

*/ AlignAccountingStyle(3); static { QtJambi_LibraryUtilities.initialize(); } private FieldAlignment(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 FieldAlignment resolve(int value) { switch (value) { case 0: return AlignLeft; case 1: return AlignRight; case 2: return AlignCenter; case 3: return AlignAccountingStyle; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QTextStream::NumberFlag

* * @see NumberFlags */ public enum NumberFlag implements QtFlagEnumerator { /** *

Representing QTextStream::ShowBase

*/ ShowBase(1), /** *

Representing QTextStream::ForcePoint

*/ ForcePoint(2), /** *

Representing QTextStream::ForceSign

*/ ForceSign(4), /** *

Representing QTextStream::UppercaseBase

*/ UppercaseBase(8), /** *

Representing QTextStream::UppercaseDigits

*/ UppercaseDigits(16); static { QtJambi_LibraryUtilities.initialize(); } private NumberFlag(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ public @NonNull NumberFlags asFlags() { return new NumberFlags(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public @NonNull NumberFlags combined(@NonNull NumberFlag e) { return asFlags().setFlag(e, true); } /** * Excludes other enum entry from a flag of this entry. * @param e enum entry * @return new flag */ public @NonNull NumberFlags cleared(@NonNull NumberFlag e) { return asFlags().setFlag(e, false); } /** * Creates a new {@link NumberFlags} from the entries. * @param values entries * @return new flag */ public static @NonNull NumberFlags flags(@Nullable NumberFlag @NonNull... values) { return new NumberFlags(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull NumberFlag resolve(int value) { switch (value) { case 1: return ShowBase; case 2: return ForcePoint; case 4: return ForceSign; case 8: return UppercaseBase; case 16: return UppercaseDigits; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** * {@link QFlags} type for enum {@link NumberFlag} */ public static final class NumberFlags extends QFlags implements Comparable { private static final long serialVersionUID = 0x89111af043a9bfd2L; static { QtJambi_LibraryUtilities.initialize(); } /** * Creates a new NumberFlags where the flags in args are set. * @param args enum entries */ public NumberFlags(@Nullable NumberFlag @NonNull... args){ super(args); } /** * Creates a new NumberFlags with given value. * @param value */ public NumberFlags(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new NumberFlags */ @Override public final @NonNull NumberFlags combined(@StrictNonNull NumberFlag e){ return new NumberFlags(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ public final @NonNull NumberFlags setFlag(@Nullable NumberFlag e){ return setFlag(e, true); } /** * Sets or clears the flag flag * @param e enum entry * @param on set (true) or clear (false) * @return this */ public final @NonNull NumberFlags setFlag(@Nullable NumberFlag e, boolean on){ if (on) { setValue(value() | e.value()); }else { setValue(value() & ~e.value()); } return this; } /** * Returns an array of flag objects represented by this NumberFlags. * @return array of enum entries */ @Override public final @NonNull NumberFlag @NonNull[] flags(){ return super.flags(NumberFlag.values()); } /** * {@inheritDoc} */ @Override public final @NonNull NumberFlags clone(){ return new NumberFlags(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(@StrictNonNull NumberFlags other){ return Integer.compare(value(), other.value()); } } /** *

Java wrapper for Qt enum QTextStream::RealNumberNotation

*/ public enum RealNumberNotation implements QtEnumerator { /** *

Representing QTextStream::SmartNotation

*/ SmartNotation(0), /** *

Representing QTextStream::FixedNotation

*/ FixedNotation(1), /** *

Representing QTextStream::ScientificNotation

*/ ScientificNotation(2); static { QtJambi_LibraryUtilities.initialize(); } private RealNumberNotation(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 RealNumberNotation resolve(int value) { switch (value) { case 0: return SmartNotation; case 1: return FixedNotation; case 2: return ScientificNotation; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QTextStream::Status

*/ public enum Status implements QtEnumerator { /** *

Representing QTextStream::Ok

*/ Ok(0), /** *

Representing QTextStream::ReadPastEnd

*/ ReadPastEnd(1), /** *

Representing QTextStream::ReadCorruptData

*/ ReadCorruptData(2), /** *

Representing QTextStream::WriteFailed

*/ WriteFailed(3); static { QtJambi_LibraryUtilities.initialize(); } private Status(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 Status resolve(int value) { switch (value) { case 0: return Ok; case 1: return ReadPastEnd; case 2: return ReadCorruptData; case 3: return WriteFailed; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

See QTextStream::QTextStream()

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

See QTextStream::QTextStream(QByteArray*,QIODeviceBase::OpenMode)

*/ public QTextStream(io.qt.core.@Nullable QByteArray array, io.qt.core.QIODeviceBase.@NonNull OpenMode openMode){ super((QPrivateConstructor)null); initialize_native(this, array, openMode); __rcDevice = array; } private native static void initialize_native(QTextStream instance, io.qt.core.QByteArray array, io.qt.core.QIODeviceBase.OpenMode openMode); /** *

See QTextStream::QTextStream(QIODevice*)

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

See QTextStream::atEnd()const

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

See QTextStream::autoDetectUnicode()const

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

See QTextStream::device()const

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

See QTextStream::encoding()const

*/ @QtUninvokable public final io.qt.core.QStringConverter.@NonNull Encoding encoding(){ return io.qt.core.QStringConverter.Encoding.resolve(encoding_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int encoding_native_constfct(long __this__nativeId); /** *

See QTextStream::fieldAlignment()const

*/ @QtUninvokable public final io.qt.core.QTextStream.@NonNull FieldAlignment fieldAlignment(){ return io.qt.core.QTextStream.FieldAlignment.resolve(fieldAlignment_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int fieldAlignment_native_constfct(long __this__nativeId); /** *

See QTextStream::fieldWidth()const

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

See QTextStream::generateByteOrderMark()const

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

See QTextStream::integerBase()const

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

See QTextStream::locale()const

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

See QTextStream::numberFlags()const

*/ @QtUninvokable public final io.qt.core.QTextStream.@NonNull NumberFlags numberFlags(){ return new io.qt.core.QTextStream.NumberFlags(numberFlags_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int numberFlags_native_constfct(long __this__nativeId); /** *

See QTextStream::operator<<(QByteArray)

*/ @QtUninvokable public final @NonNull QTextStream append(io.qt.core.@NonNull QByteArray array){ return append_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(array)); } @QtUninvokable private native QTextStream append_native_cref_QByteArray(long __this__nativeId, long array); /** *

See QTextStream::operator<<(QChar)

*/ @QtUninvokable public final @NonNull QTextStream append(char ch){ return append_native_QChar(QtJambi_LibraryUtilities.internal.nativeId(this), ch); } @QtUninvokable private native QTextStream append_native_QChar(long __this__nativeId, char ch); /** *

See QTextStream::operator<<(QString)

*/ @QtUninvokable public final @NonNull QTextStream append(java.lang.@Nullable CharSequence s){ return append_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), s); } @QtUninvokable private native QTextStream append_native_cref_QString(long __this__nativeId, java.lang.CharSequence s); /** *

See QTextStream::operator<<(char)

*/ @QtUninvokable public final @NonNull QTextStream append(byte ch){ return append_native_char(QtJambi_LibraryUtilities.internal.nativeId(this), ch); } @QtUninvokable private native QTextStream append_native_char(long __this__nativeId, byte ch); /** *

See QTextStream::operator<<(const char*)

*/ @QtUninvokable public final @NonNull QTextStream append(java.lang.@Nullable String c){ return append_native_const_char_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), c); } @QtUninvokable private native QTextStream append_native_const_char_ptr(long __this__nativeId, java.lang.String c); /** *

See QTextStream::operator<<(double)

*/ @QtUninvokable public final @NonNull QTextStream append(double f){ return append_native_double(QtJambi_LibraryUtilities.internal.nativeId(this), f); } @QtUninvokable private native QTextStream append_native_double(long __this__nativeId, double f); /** *

See QTextStream::operator<<(float)

*/ @QtUninvokable public final @NonNull QTextStream append(float f){ return append_native_float(QtJambi_LibraryUtilities.internal.nativeId(this), f); } @QtUninvokable private native QTextStream append_native_float(long __this__nativeId, float f); /** *

See QTextStream::operator<<(int)

*/ @QtUninvokable public final @NonNull QTextStream append(int i){ return append_native_signed_int(QtJambi_LibraryUtilities.internal.nativeId(this), i); } @QtUninvokable private native QTextStream append_native_signed_int(long __this__nativeId, int i); /** *

See QTextStream::operator<<(qlonglong)

*/ @QtUninvokable public final @NonNull QTextStream append(long i){ return append_native_qlonglong(QtJambi_LibraryUtilities.internal.nativeId(this), i); } @QtUninvokable private native QTextStream append_native_qlonglong(long __this__nativeId, long i); /** *

See QTextStream::operator<<(short)

*/ @QtUninvokable public final @NonNull QTextStream append(short i){ return append_native_signed_short(QtJambi_LibraryUtilities.internal.nativeId(this), i); } @QtUninvokable private native QTextStream append_native_signed_short(long __this__nativeId, short i); /** *

See QTextStream::operator>>(QByteArray&)

*/ @QtUninvokable public final io.qt.core.@StrictNonNull QByteArray readBytes(){ return readBytes_native_ref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QByteArray readBytes_native_ref_QByteArray(long __this__nativeId); /** *

See QTextStream::operator>>(QChar&)

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

See QTextStream::operator>>(QString&)

*/ @QtUninvokable public final io.qt.core.@StrictNonNull QString readQString(){ return readQString_native_ref_QString(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QString readQString_native_ref_QString(long __this__nativeId); /** *

See QTextStream::operator>>(char&)

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

See QTextStream::operator>>(char*)

*/ @QtUninvokable public final java.lang.String readString(){ return readString_native_char_ptr(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native java.lang.String readString_native_char_ptr(long __this__nativeId); /** *

See QTextStream::operator>>(double&)

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

See QTextStream::operator>>(float&)

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

See QTextStream::operator>>(int&)

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

See QTextStream::operator>>(qlonglong&)

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

See QTextStream::operator>>(short&)

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

See QTextStream::padChar()const

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

See QTextStream::pos()const

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

See QTextStream::read(qint64)

*/ @QtUninvokable public final java.lang.@NonNull String read(long maxlen){ return read_native_qint64(QtJambi_LibraryUtilities.internal.nativeId(this), maxlen); } @QtUninvokable private native java.lang.String read_native_qint64(long __this__nativeId, long maxlen); /** *

See QTextStream::readAll()

*/ @QtUninvokable public final java.lang.@NonNull String readAll(){ return readAll_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native java.lang.String readAll_native(long __this__nativeId); /** *

See QTextStream::readLine(qint64)

*/ @QtUninvokable public final java.lang.@NonNull String readLine(long maxlen){ return readLine_native_qint64(QtJambi_LibraryUtilities.internal.nativeId(this), maxlen); } @QtUninvokable private native java.lang.String readLine_native_qint64(long __this__nativeId, long maxlen); /** *

See QTextStream::realNumberNotation()const

*/ @QtUninvokable public final io.qt.core.QTextStream.@NonNull RealNumberNotation realNumberNotation(){ return io.qt.core.QTextStream.RealNumberNotation.resolve(realNumberNotation_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int realNumberNotation_native_constfct(long __this__nativeId); /** *

See QTextStream::realNumberPrecision()const

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

See QTextStream::resetStatus()

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

See QTextStream::seek(qint64)

*/ @QtUninvokable public final boolean seek(long pos){ return seek_native_qint64(QtJambi_LibraryUtilities.internal.nativeId(this), pos); } @QtUninvokable private native boolean seek_native_qint64(long __this__nativeId, long pos); /** *

See QTextStream::setAutoDetectUnicode(bool)

*/ @QtUninvokable public final void setAutoDetectUnicode(boolean enabled){ setAutoDetectUnicode_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), enabled); } @QtUninvokable private native void setAutoDetectUnicode_native_bool(long __this__nativeId, boolean enabled); /** *

See QTextStream::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 QTextStream::setEncoding(QStringConverter::Encoding)

*/ @QtUninvokable public final void setEncoding(io.qt.core.QStringConverter.@NonNull Encoding encoding){ setEncoding_native_QStringConverter_Encoding(QtJambi_LibraryUtilities.internal.nativeId(this), encoding.value()); } @QtUninvokable private native void setEncoding_native_QStringConverter_Encoding(long __this__nativeId, int encoding); /** *

See QTextStream::setFieldAlignment(QTextStream::FieldAlignment)

*/ @QtUninvokable public final void setFieldAlignment(io.qt.core.QTextStream.@NonNull FieldAlignment alignment){ setFieldAlignment_native_QTextStream_FieldAlignment(QtJambi_LibraryUtilities.internal.nativeId(this), alignment.value()); } @QtUninvokable private native void setFieldAlignment_native_QTextStream_FieldAlignment(long __this__nativeId, int alignment); /** *

See QTextStream::setFieldWidth(int)

*/ @QtUninvokable public final void setFieldWidth(int width){ setFieldWidth_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), width); } @QtUninvokable private native void setFieldWidth_native_int(long __this__nativeId, int width); /** *

See QTextStream::setGenerateByteOrderMark(bool)

*/ @QtUninvokable public final void setGenerateByteOrderMark(boolean generate){ setGenerateByteOrderMark_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), generate); } @QtUninvokable private native void setGenerateByteOrderMark_native_bool(long __this__nativeId, boolean generate); /** *

See QTextStream::setIntegerBase(int)

*/ @QtUninvokable public final void setIntegerBase(int base){ setIntegerBase_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), base); } @QtUninvokable private native void setIntegerBase_native_int(long __this__nativeId, int base); /** *

See QTextStream::setLocale(QLocale)

*/ @QtUninvokable public final void setLocale(io.qt.core.@NonNull QLocale locale){ setLocale_native_cref_QLocale(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(locale)); } @QtUninvokable private native void setLocale_native_cref_QLocale(long __this__nativeId, long locale); /** *

See QTextStream::setNumberFlags(QTextStream::NumberFlags)

*/ @QtUninvokable public final void setNumberFlags(io.qt.core.QTextStream.@NonNull NumberFlags flags){ setNumberFlags_native_QTextStream_NumberFlags(QtJambi_LibraryUtilities.internal.nativeId(this), flags.value()); } @QtUninvokable private native void setNumberFlags_native_QTextStream_NumberFlags(long __this__nativeId, int flags); /** *

See QTextStream::setPadChar(QChar)

*/ @QtUninvokable public final void setPadChar(char ch){ setPadChar_native_QChar(QtJambi_LibraryUtilities.internal.nativeId(this), ch); } @QtUninvokable private native void setPadChar_native_QChar(long __this__nativeId, char ch); /** *

See QTextStream::setRealNumberNotation(QTextStream::RealNumberNotation)

*/ @QtUninvokable public final void setRealNumberNotation(io.qt.core.QTextStream.@NonNull RealNumberNotation notation){ setRealNumberNotation_native_QTextStream_RealNumberNotation(QtJambi_LibraryUtilities.internal.nativeId(this), notation.value()); } @QtUninvokable private native void setRealNumberNotation_native_QTextStream_RealNumberNotation(long __this__nativeId, int notation); /** *

See QTextStream::setRealNumberPrecision(int)

*/ @QtUninvokable public final void setRealNumberPrecision(int precision){ setRealNumberPrecision_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), precision); } @QtUninvokable private native void setRealNumberPrecision_native_int(long __this__nativeId, int precision); /** *

See QTextStream::setStatus(QTextStream::Status)

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

See QTextStream::skipWhiteSpace()

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

See QTextStream::status()const

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

See QTextStream::string() const

*/ public final @Nullable CharSequence string() { QIODevice device = device_private(); if(device instanceof StringDevice) { flush(); return ((StringDevice) device).string; } if(device instanceof CharSequence) { flush(); return (CharSequence) device; } return null; } /** * Appends a subsequence of the specified character sequence to this QTextStream. */ @Override public final @NonNull QTextStream append(CharSequence csq, int start, int end) { return append(csq==null ? "null" : csq.subSequence(start, end)); } /** *

See QTextStream::device()const

*/ @QtUninvokable public final @Nullable QIODevice device(){ QIODevice __qt_return_value = device_private(); if(__qt_return_value instanceof StringDevice) return null; return __qt_return_value; } /** *

See QTextStream::setString(QString *, QIODeviceBase::OpenMode)

*/ @SuppressWarnings("hiding") public void setString(String string, QIODevice.@NonNull OpenModeFlag @NonNull... openMode) { setString(string, new QIODevice.OpenMode(openMode)); } /** *

See QTextStream::setString(QString *, QIODeviceBase::OpenMode)

*/ @SuppressWarnings("hiding") public void setString(String string) { setString(string, new QIODevice.OpenMode(4)); } /** *

See QTextStream::setString(QString *, QIODeviceBase::OpenMode)

*/ @SuppressWarnings("hiding") public void setString(String string, QIODevice.@NonNull OpenMode openMode) { flush(); setDevice(new StringDevice(java.util.Objects.requireNonNull(string, "Argument 'string': null not expected."), openMode)); } /** *

See QTextStream::setString(QString *, QIODeviceBase::OpenMode)

*/ public void setString(@NonNull String string, QIODevice.OpenModeFlag ... openMode) { setString(string, new QIODevice.OpenMode(openMode)); } /** *

See QTextStream::setString(QString *, QIODeviceBase::OpenMode)

*/ public void setString(@NonNull String string) { setString(string, new QIODevice.OpenMode(4)); } /** *

See QTextStream::setString(QString *, QIODeviceBase::OpenMode)

*/ public void setString(@NonNull String string, QIODevice.OpenMode openMode) { setString(string==null ? new StringBuilder() : new StringBuilder(string), openMode); } /** *

See QTextStream::QTextStream(QString *, QIODeviceBase::OpenMode)

*/ @SuppressWarnings("hiding") public QTextStream(String string, QIODevice.@NonNull OpenModeFlag @NonNull... openMode) { this(string, new QIODevice.OpenMode(openMode)); } /** *

See QTextStream::QTextStream(QString *, QIODeviceBase::OpenMode)

*/ @SuppressWarnings("hiding") public QTextStream(String string) { this(string, new QIODevice.OpenMode(3)); } /** *

See QTextStream::QTextStream(QString *, QIODeviceBase::OpenMode)

*/ @SuppressWarnings("hiding") public QTextStream(String string, QIODevice.@NonNull OpenMode openMode){ this(new StringDevice(java.util.Objects.requireNonNull(string, "Argument 'string': null not expected."), openMode)); } /** *

See QTextStream::QTextStream(QString *, QIODeviceBase::OpenMode)

*/ public QTextStream(@NonNull String string, QIODevice.@NonNull OpenModeFlag @NonNull... openMode) { this(string, new QIODevice.OpenMode(openMode)); } /** *

See QTextStream::QTextStream(QString *, QIODeviceBase::OpenMode)

*/ public QTextStream(@NonNull String string) { this(string, new QIODevice.OpenMode(3)); } /** *

See QTextStream::QTextStream(QString *, QIODeviceBase::OpenMode)

*/ public QTextStream(@NonNull String string, QIODevice.@NonNull OpenMode openMode){ this(string==null ? new StringBuilder() : new StringBuilder(string), openMode); } @SuppressWarnings("hiding") static final class StringDevice extends QIODevice{ StringDevice(String string, QIODevice.OpenModeFlag... openMode) { this(string, QIODevice.OpenModeFlag.flags(openMode)); } StringDevice(String string, QIODevice.OpenMode openMode) { super(); this.string = string; openMode.set(QIODevice.OpenModeFlag.Text); this.setOpenMode(openMode); } private final String string; private final java.nio.charset.CharsetEncoder encoder = java.nio.charset.Charset.defaultCharset().newEncoder(); private final java.nio.charset.CharsetDecoder decoder = java.nio.charset.Charset.defaultCharset().newDecoder(); private int cursor; @Override protected int readData(java.nio.ByteBuffer data) { if(data!=null && openMode().testFlag(QIODevice.OpenModeFlag.ReadOnly) && data.limit()-data.position()>0){ int initialPos = data.position(); java.nio.charset.CoderResult result = encoder.encode(java.nio.CharBuffer.wrap(string, cursor, string.length()), data, false); if(result.isError() || result.isOverflow()) { try { result.throwException(); } catch (Exception e) { e.printStackTrace(); } } cursor += data.position()-initialPos; return data.position()-initialPos; } return -1; } @Override protected int writeData(java.nio.ByteBuffer data) { if(data!=null && openMode().testFlag(QIODevice.OpenModeFlag.WriteOnly) && data.limit()-data.position()>0){ int initialPos = data.position(); int n = (int)Math.max(data.remaining(), (data.remaining() / decoder.averageCharsPerByte())+1); java.nio.CharBuffer out = java.nio.CharBuffer.allocate(n); decoder.decode(data, out, false); ((java.nio.Buffer)out).flip(); try { string.append(out); } catch (Exception e) { e.printStackTrace(); } return data.position()-initialPos; } return -1; } @Override public boolean isSequential() { return this.openMode().testFlag(QIODevice.OpenModeFlag.WriteOnly); } @Override public boolean seek(long pos) { if(pos=0 && posSee QTextStream::operator<<

*/ @QtUninvokable public final @NonNull QTextStream writeString(java.lang.String s){ return append(s); } /** *

See QTextStream::operator<<

*/ @QtUninvokable public final @NonNull QTextStream writeString(java.lang.CharSequence s){ return append(s); } /** *

See QTextStream::operator<<

*/ @QtUninvokable public final @NonNull QTextStream writeDouble(double v){ return append(v); } /** *

See QTextStream::operator<<

*/ @QtUninvokable public final @NonNull QTextStream writeByte(byte v){ return append(v); } /** *

See QTextStream::operator<<

*/ @QtUninvokable public final @NonNull QTextStream writeBytes(QByteArray v){ return append(v); } /** *

See QTextStream::operator<<

*/ @QtUninvokable public final @NonNull QTextStream writeChar(char v){ return append(v); } /** *

See QTextStream::operator<<

*/ @QtUninvokable public final @NonNull QTextStream writeFloat(float v){ return append(v); } /** *

See QTextStream::operator<<

*/ @QtUninvokable public final @NonNull QTextStream writeInt(int v){ return append(v); } /** *

See QTextStream::operator<<

*/ @QtUninvokable public final @NonNull QTextStream writeLong(long v){ return append(v); } /** *

See QTextStream::operator<<

*/ @QtUninvokable public final @NonNull QTextStream writeShort(short v){ return append(v); } /** *

See Qt::endl

*/ @QtUninvokable public final @NonNull QTextStream endl(){ endl(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void endl(long __this__nativeId); /** *

See Qt::flush

*/ @QtUninvokable public final @NonNull QTextStream flush(){ flush(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void flush(long __this__nativeId); /** *

See Qt::reset

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

See Qt::bin

*/ @QtUninvokable public final @NonNull QTextStream bin(){ bin(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void bin(long __this__nativeId); /** *

See Qt::oct

*/ @QtUninvokable public final @NonNull QTextStream oct(){ oct(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void oct(long __this__nativeId); /** *

See Qt::hex

*/ @QtUninvokable public final @NonNull QTextStream hex(){ hex(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void hex(long __this__nativeId); /** *

See Qt::dec

*/ @QtUninvokable public final @NonNull QTextStream dec(){ dec(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void dec(long __this__nativeId); /** *

See Qt::showbase

*/ @QtUninvokable public final @NonNull QTextStream showbase(){ showbase(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void showbase(long __this__nativeId); /** *

See Qt::forcesign

*/ @QtUninvokable public final @NonNull QTextStream forcesign(){ forcesign(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void forcesign(long __this__nativeId); /** *

See Qt::forcepoint

*/ @QtUninvokable public final @NonNull QTextStream forcepoint(){ forcepoint(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void forcepoint(long __this__nativeId); /** *

See Qt::noshowbase

*/ @QtUninvokable public final @NonNull QTextStream noshowbase(){ noshowbase(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void noshowbase(long __this__nativeId); /** *

See Qt::noforcesign

*/ @QtUninvokable public final @NonNull QTextStream noforcesign(){ noforcesign(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void noforcesign(long __this__nativeId); /** *

See Qt::noforcepoint

*/ @QtUninvokable public final @NonNull QTextStream noforcepoint(){ noforcepoint(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void noforcepoint(long __this__nativeId); /** *

See Qt::uppercasebase

*/ @QtUninvokable public final @NonNull QTextStream uppercasebase(){ uppercasebase(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void uppercasebase(long __this__nativeId); /** *

See Qt::uppercasedigits

*/ @QtUninvokable public final @NonNull QTextStream uppercasedigits(){ uppercasedigits(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void uppercasedigits(long __this__nativeId); /** *

See Qt::lowercasebase

*/ @QtUninvokable public final @NonNull QTextStream lowercasebase(){ lowercasebase(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void lowercasebase(long __this__nativeId); /** *

See Qt::lowercasedigits

*/ @QtUninvokable public final @NonNull QTextStream lowercasedigits(){ lowercasedigits(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void lowercasedigits(long __this__nativeId); /** *

See Qt::fixed

*/ @QtUninvokable public final @NonNull QTextStream fixed(){ fixed(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void fixed(long __this__nativeId); /** *

See Qt::scientific

*/ @QtUninvokable public final @NonNull QTextStream scientific(){ scientific(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void scientific(long __this__nativeId); /** *

See Qt::left

*/ @QtUninvokable public final @NonNull QTextStream left(){ left(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void left(long __this__nativeId); /** *

See Qt::right

*/ @QtUninvokable public final @NonNull QTextStream right(){ right(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void right(long __this__nativeId); /** *

See Qt::center

*/ @QtUninvokable public final @NonNull QTextStream center(){ center(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void center(long __this__nativeId); /** *

See Qt::bom

*/ @QtUninvokable public final @NonNull QTextStream bom(){ bom(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void bom(long __this__nativeId); /** *

See Qt::ws

*/ @QtUninvokable public final @NonNull QTextStream ws(){ ws(QtJambi_LibraryUtilities.internal.nativeId(this)); return this; } @QtUninvokable private native void ws(long __this__nativeId); /** *

See qSetFieldWidth(int width)

*/ @QtUninvokable public final @NonNull QTextStream qSetFieldWidth(int width){ setFieldWidth(QtJambi_LibraryUtilities.internal.nativeId(this), width); return this; } @QtUninvokable private native void setFieldWidth(long __this__nativeId, int width); /** *

See qSetRealNumberPrecision(int precision)

*/ @QtUninvokable public final @NonNull QTextStream qSetRealNumberPrecision(int precision){ setRealNumberPrecision(QtJambi_LibraryUtilities.internal.nativeId(this), precision); return this; } @QtUninvokable private native void setRealNumberPrecision(long __this__nativeId, int precision); /** *

See qSetPadChar(QChar ch)

*/ @QtUninvokable public final @NonNull QTextStream qSetPadChar(char ch){ setPadChar(QtJambi_LibraryUtilities.internal.nativeId(this), ch); return this; } @QtUninvokable private native void setPadChar(long __this__nativeId, char ch); /** *

Overloaded constructor for {@link #QTextStream(io.qt.core.QByteArray, io.qt.core.QIODeviceBase.OpenMode)} * with openMode = new io.qt.core.QIODeviceBase.OpenMode(3).

*/ public QTextStream(io.qt.core.@Nullable QByteArray array) { this(array, new io.qt.core.QIODeviceBase.OpenMode(3)); } /** *

Overloaded constructor for {@link #QTextStream(io.qt.core.QByteArray, io.qt.core.QIODeviceBase.OpenMode)}.

*/ public QTextStream(io.qt.core.@Nullable QByteArray array, io.qt.core.QIODeviceBase.@NonNull OpenModeFlag @NonNull... openMode) { this(array, new io.qt.core.QIODeviceBase.OpenMode(openMode)); } /** *

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

*/ @QtUninvokable public final @NonNull QTextStream append(byte @NonNull[] array) { return append(new io.qt.core.QByteArray(array)); } /** *

Overloaded function for {@link #readLine(long)} * with maxlen = 0.

*/ @QtUninvokable public final java.lang.@NonNull String readLine() { return readLine((long)0); } /** *

Overloaded function for {@link #setLocale(io.qt.core.QLocale)}.

*/ @QtUninvokable public final void setLocale(io.qt.core.QLocale.@NonNull Language locale) { setLocale(new io.qt.core.QLocale(locale)); } /** *

Overloaded function for {@link #setNumberFlags(io.qt.core.QTextStream.NumberFlags)}.

*/ @QtUninvokable public final void setNumberFlags(io.qt.core.QTextStream.@NonNull NumberFlag @NonNull... flags) { setNumberFlags(new io.qt.core.QTextStream.NumberFlags(flags)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy