|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<QIODevice.OpenModeFlag>
com.trolltech.qt.core.QIODevice.OpenModeFlag
public static enum QIODevice.OpenModeFlag
This enum is used with open to describe the mode in which a device is opened. It is also returned by openMode.
Certain flags, such as Unbuffered and Truncate, are meaningless when used with some subclasses. Some of these restrictions are implied by the type of device that is represented by a subclass; for example, access to a QBuffer is always unbuffered. In other cases, the restriction may be due to the implementation, or may be imposed by the underlying platform; for example, QTcpSocket does not support Unbuffered mode, and limitations in the native API prevent QFile from supporting Unbuffered on Windows.
Enum Constant Summary | |
---|---|
Append
The device is opened in append mode, so that all data is written to the end of the file. |
|
NotOpen
The device is not open. |
|
ReadOnly
The device is open for reading. |
|
ReadWrite
The device is open for reading and writing. |
|
Text
When reading, the end-of-line terminators are translated to '\n'. |
|
Truncate
If possible, the device is truncated before it is opened. |
|
Unbuffered
Any buffer in the device is bypassed. |
|
WriteOnly
The device is open for writing. |
Method Summary | |
---|---|
static QIODevice.OpenMode |
createQFlags(QIODevice.OpenModeFlag... values)
|
static QIODevice.OpenModeFlag |
resolve(int value)
|
int |
value()
This function should return an integer value for the enum values of the enumeration that implements this interface. |
static QIODevice.OpenModeFlag |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static QIODevice.OpenModeFlag[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final QIODevice.OpenModeFlag NotOpen
The device is not open.
public static final QIODevice.OpenModeFlag ReadOnly
The device is open for reading.
public static final QIODevice.OpenModeFlag WriteOnly
The device is open for writing.
public static final QIODevice.OpenModeFlag ReadWrite
The device is open for reading and writing.
public static final QIODevice.OpenModeFlag Append
The device is opened in append mode, so that all data is written to the end of the file.
public static final QIODevice.OpenModeFlag Truncate
If possible, the device is truncated before it is opened. All earlier contents of the device are lost.
public static final QIODevice.OpenModeFlag Text
When reading, the end-of-line terminators are translated to '\n'. When writing, the end-of-line terminators are translated to the local encoding, for example '\r\n' for Win32.
public static final QIODevice.OpenModeFlag Unbuffered
Any buffer in the device is bypassed.
Method Detail |
---|
public static QIODevice.OpenModeFlag[] values()
for (QIODevice.OpenModeFlag c : QIODevice.OpenModeFlag.values()) System.out.println(c);
public static QIODevice.OpenModeFlag valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic int value()
QtEnumerator
value
in interface QtEnumerator
public static QIODevice.OpenMode createQFlags(QIODevice.OpenModeFlag... values)
public static QIODevice.OpenModeFlag resolve(int value)
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |