com.trolltech.qt.core
Enum QAbstractFileEngine.Extension

java.lang.Object
  extended by java.lang.Enum<QAbstractFileEngine.Extension>
      extended by com.trolltech.qt.core.QAbstractFileEngine.Extension
All Implemented Interfaces:
QtEnumerator, java.io.Serializable, java.lang.Comparable<QAbstractFileEngine.Extension>
Enclosing class:
QAbstractFileEngine

public static enum QAbstractFileEngine.Extension
extends java.lang.Enum<QAbstractFileEngine.Extension>
implements QtEnumerator

This enum describes the types of extensions that the file engine can support. Before using these extensions, you must verify that the extension is supported (i.e., call supportsExtension).


Enum Constant Summary
AtEndExtension
          Whether the current file position is at the end of the file or not.
CustomEnum
           
FastReadLineExtension
          Whether the file engine provides a fast implementation for readLine or not.
 
Method Summary
static QAbstractFileEngine.Extension resolve(int value)
           
 int value()
           
static QAbstractFileEngine.Extension valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static QAbstractFileEngine.Extension[] 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

AtEndExtension

public static final QAbstractFileEngine.Extension AtEndExtension

Whether the current file position is at the end of the file or not. This extension allows file engines that implement local buffering to report end-of-file status without having to check the size of the file. It is also useful for sequential files, where the size of the file cannot be used to determine whether or not you have reached the end. This extension returns true if the file is at the end; otherwise it returns false. The input and output arguments to extension() are ignored.


FastReadLineExtension

public static final QAbstractFileEngine.Extension FastReadLineExtension

Whether the file engine provides a fast implementation for readLine or not. If readLine remains unimplemented in the file engine, QAbstractFileEngine will provide an implementation based on calling read repeatedly. If supportsExtension returns false for this extension, however, QIODevice can provide a faster implementation by making use of its internal buffer. For engines that already provide a fast readLine implementation, returning false for this extension can avoid unnnecessary double-buffering in QIODevice.


CustomEnum

public static final QAbstractFileEngine.Extension CustomEnum
Method Detail

values

public static final QAbstractFileEngine.Extension[] 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(QAbstractFileEngine.Extension c : QAbstractFileEngine.Extension.values())
        System.out.println(c);

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

valueOf

public static QAbstractFileEngine.Extension 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()
Specified by:
value in interface QtEnumerator

resolve

public static QAbstractFileEngine.Extension resolve(int value)