com.trolltech.qt.network
Class QNetworkCacheMetaData

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      extended by com.trolltech.qt.QSignalEmitter
          extended by com.trolltech.qt.QtJambiObject
              extended by com.trolltech.qt.network.QNetworkCacheMetaData
All Implemented Interfaces:
QtJambiInterface, java.lang.Cloneable

public class QNetworkCacheMetaData
extends QtJambiObject
implements java.lang.Cloneable

The QNetworkCacheMetaData class provides cache information. QNetworkCacheMetaData provides information about a cache file including the url, when it was last modified, when the cache file was created, headers for file and if the file should be saved onto a disk.

See also:
QAbstractNetworkCache.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.PrivateSignal0, QSignalEmitter.PrivateSignal1, QSignalEmitter.PrivateSignal2, QSignalEmitter.PrivateSignal3, QSignalEmitter.PrivateSignal4, QSignalEmitter.PrivateSignal5, QSignalEmitter.PrivateSignal6, QSignalEmitter.PrivateSignal7, QSignalEmitter.PrivateSignal8, QSignalEmitter.PrivateSignal9, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9
 
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal
 
Field Summary
 
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
currentSender
 
Constructor Summary
QNetworkCacheMetaData()
          Constructs an invalid network cache meta data.
QNetworkCacheMetaData(QNetworkCacheMetaData other)
          Constructs a copy of the otherQNetworkCacheMetaData.
 
Method Summary
 java.util.HashMap attributes()
           
 QNetworkCacheMetaData clone()
          This method is reimplemented for internal reasons
 QDateTime expirationDate()
          Returns the date and time when the meta data expires.
 boolean isValid()
          Returns true if this network cache meta data has attributes that have been set otherwise false.
 QDateTime lastModified()
          Returns the date and time when the meta data was last modified.
 java.util.List rawHeaders()
          Returns a list of all raw headers that are set in this meta data.
 void readFrom(QDataStream arg__1)
          Reads a QNetworkCacheMetaData
 boolean saveToDisk()
          Returns is this cache should be allowed to be stored on disk.
 void setAttributes(java.util.HashMap attributes)
           
 void setExpirationDate(QDateTime dateTime)
          Sets the date and time when the meta data expires to dateTime.
 void setLastModified(QDateTime dateTime)
          Sets the date and time when the meta data was last modified to dateTime.
 void setRawHeaders(java.util.List headers)
           
 void setSaveToDisk(boolean allow)
          Sets whether this network cache meta data and associated content should be allowed to be stored on disk to allow.
 void setUrl(QUrl url)
          Sets the URL this network cache meta data to to be url.
 QUrl url()
          Returns the URL this network cache meta data is referring to.
 void writeTo(QDataStream arg__1)
          Writes thisQNetworkCacheMetaData
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
__qt_signalInitialization
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QNetworkCacheMetaData

public QNetworkCacheMetaData()
Constructs an invalid network cache meta data.

See also:
isValid().


QNetworkCacheMetaData

public QNetworkCacheMetaData(QNetworkCacheMetaData other)
Constructs a copy of the otherQNetworkCacheMetaData.

Method Detail

attributes

public final java.util.HashMap attributes()

expirationDate

public final QDateTime expirationDate()
Returns the date and time when the meta data expires.

See also:
setExpirationDate().


isValid

public final boolean isValid()
Returns true if this network cache meta data has attributes that have been set otherwise false.


lastModified

public final QDateTime lastModified()
Returns the date and time when the meta data was last modified.

See also:
setLastModified().


writeTo

public final void writeTo(QDataStream arg__1)
Writes thisQNetworkCacheMetaData


readFrom

public final void readFrom(QDataStream arg__1)
Reads a QNetworkCacheMetaData


rawHeaders

public final java.util.List rawHeaders()
Returns a list of all raw headers that are set in this meta data. The list is in the same order that the headers were set.

See also:
setRawHeaders().


saveToDisk

public final boolean saveToDisk()
Returns is this cache should be allowed to be stored on disk.

Some cache implementations can keep these cache items in memory for performance reasons, but for security reasons they should not be written to disk.

Specifically with http, documents marked with Pragma: no-cache, or have a Cache-control set to no-store or no-cache or any https document that doesn't have "Cache-control: public" set will set the saveToDisk to false.

See also:
setSaveToDisk().


setAttributes

public final void setAttributes(java.util.HashMap attributes)

setExpirationDate

public final void setExpirationDate(QDateTime dateTime)
Sets the date and time when the meta data expires to dateTime.

See also:
expirationDate().


setLastModified

public final void setLastModified(QDateTime dateTime)
Sets the date and time when the meta data was last modified to dateTime.

See also:
lastModified().


setRawHeaders

public final void setRawHeaders(java.util.List headers)

setSaveToDisk

public final void setSaveToDisk(boolean allow)
Sets whether this network cache meta data and associated content should be allowed to be stored on disk to allow.

See also:
saveToDisk().


setUrl

public final void setUrl(QUrl url)
Sets the URL this network cache meta data to to be url.

The password and fragment are removed from the url.

See also:
url().


url

public final QUrl url()
Returns the URL this network cache meta data is referring to.

See also:
setUrl().


clone

public QNetworkCacheMetaData clone()
This method is reimplemented for internal reasons

Overrides:
clone in class java.lang.Object