Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## com.trolltech.qt.core
Enum QIODevice.OpenModeFlag

    java.lang.Object
      java.lang.Enum<QIODevice.OpenModeFlag>
          com.trolltech.qt.core.QIODevice.OpenModeFlag

All Implemented Interfaces:
  QtEnumerator, java.io.Serializable, java.lang.Comparable<QIODevice.OpenModeFlag>

Enclosing class:
  QIODevice

    public static enum QIODevice.OpenModeFlag

extends java.lang.Enum<QIODevice.OpenModeFlag>
implements QtEnumerator

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're declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### NotOpen

    public static final QIODevice.OpenModeFlag NotOpen

  The device is not open.

### ReadOnly

    public static final QIODevice.OpenModeFlag ReadOnly

  The device is open for reading.

### WriteOnly

    public static final QIODevice.OpenModeFlag WriteOnly

  The device is open for writing.

### ReadWrite

    public static final QIODevice.OpenModeFlag ReadWrite

  The device is open for reading and writing.

### Append

    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.

### Truncate

    public static final QIODevice.OpenModeFlag Truncate

  If possible, the device is truncated before it is opened. All earlier contents of the device are lost.

### Text

    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.

### Unbuffered

    public static final QIODevice.OpenModeFlag Unbuffered

  Any buffer in the device is bypassed.

Method Detail

### values

    public static final QIODevice.OpenModeFlag[] values()

  Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:

      for(QIODevice.OpenModeFlag c : QIODevice.OpenModeFlag.values())
              System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they're declared

### valueOf

    public static QIODevice.OpenModeFlag valueOf(java.lang.String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name

### value

    public int value()

  Description copied from interface: `QtEnumerator`
  This function should return an integer value for the enum values of the enumeration that implements this interface.

  Specified by:
    `value` in interface `QtEnumerator`

### createQFlags

    public static QIODevice.OpenMode createQFlags(QIODevice.OpenModeFlag... values)

### resolve

    public static QIODevice.OpenModeFlag resolve(int value)

Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD