ccs.cdb
Class CDBFileMeta

java.lang.Object
  extended by ccs.beetree.BeeObject
      extended by ccs.cdb.CDBObject
          extended by ccs.cdb.MKCDBObject
              extended by ccs.cdb.CDBFileMeta
All Implemented Interfaces:
java.io.Serializable

public class CDBFileMeta
extends MKCDBObject

The metadata stored for a CDBFile (qv.) Don't try to create your own - use CDBFilesystem instead.

See Also:
CDBFilesystem.getFileMeta(ccs.cdb.CDBeeTree, java.lang.String), Serialized Form

Field Summary
 java.lang.String encodedLast
          Undocumented.
 java.lang.String encodedLength
          Undocumented.
 java.lang.String internalPath
          Undocumented.
 
Fields inherited from class ccs.cdb.MKCDBObject
keyfieldnames
 
Fields inherited from class ccs.cdb.CDBObject
clone, key, marshalVersion, owner
 
Fields inherited from class ccs.beetree.BeeObject
cipher, isBodiless, isForceDirectDecrypt, isZip, slack
 
Constructor Summary
CDBFileMeta()
           
 
Method Summary
protected  void cpmarshal(java.io.DataOutputStream dest)
          override this to marshal your data, just like marshal.
protected  void cpunmarshal(java.io.DataInputStream src, int marshalver)
          override this to unmarshal your data, just like unmarshal.
 long getLastModified()
           
 long getLength()
           
 
Methods inherited from class ccs.cdb.MKCDBObject
cpgetKey, cpsetKey
 
Methods inherited from class ccs.cdb.CDBObject
canChangeKeyProgrammatically, canDeleteProgrammatically, canUpdateProgrammatically, cpgetMarshalledLength, cppreMarshal, cppreUnmarshal, getCDB, getKey, getMarshalledLength, marshal, preMarshal, preUnmarshal, setCDB, setKey, transientMarshal, transientUnmarshal, unmarshal
 
Methods inherited from class ccs.beetree.BeeObject
lock, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

internalPath

public java.lang.String internalPath
Undocumented.


encodedLength

public java.lang.String encodedLength
Undocumented.


encodedLast

public java.lang.String encodedLast
Undocumented.

Constructor Detail

CDBFileMeta

public CDBFileMeta()
Method Detail

getLength

public long getLength()
Returns:
The uncompressed length of the CDBFile's content. The size on disk is likely to be different.

getLastModified

public long getLastModified()
Returns:
The last-modified time of the file, in ms since the epoch.

cpmarshal

protected void cpmarshal(java.io.DataOutputStream dest)
                  throws java.io.IOException
Description copied from class: CDBObject
override this to marshal your data, just like marshal. The data will be in the object's fields when this is called (rather than within any UI objects).

Specified by:
cpmarshal in class CDBObject
Parameters:
dest - The stream to marshal onto.
Throws:
java.io.IOException - If this breaks (breaks the CDB too).

cpunmarshal

protected void cpunmarshal(java.io.DataInputStream src,
                           int marshalver)
                    throws java.io.IOException
Description copied from class: CDBObject
override this to unmarshal your data, just like unmarshal.

Specified by:
cpunmarshal in class CDBObject
Parameters:
src - The stream to unmarshal from
marshalver - The marshal version of the data in src - i.e. the version of this class which wrote the data. This may be different from the current marshalVersion. If so (i.e. the stored data is the wrong version) your method should allow for it. This allows comparatively painless data migration between versions of your objects.
Throws:
java.io.IOException - if this breaks (breaks the CDB too).