rossi.fstools.fs.reiserfs
Class StatDataV1

java.lang.Object
  extended byrossi.fstools.fs.reiserfs.Item
      extended byrossi.fstools.fs.reiserfs.StatDataItem
          extended byrossi.fstools.fs.reiserfs.StatDataV1
All Implemented Interfaces:
Inode

public class StatDataV1
extends StatDataItem

Representation of a Stat data v1.

        31        24        16       8       0
        --------------------------------------
  0000  |      Mode         |  Num Links     |
        --------------------------------------
  0004  |      User ID      | Group Id       |
        --------------------------------------
  0008  |             File Size              |
        --------------------------------------
  000C  |            Access Time             |
        --------------------------------------
  0010  |            Modify Time             |
        --------------------------------------
  0014  |            Changed Time            |
        --------------------------------------
  0018  |            Rdev/Blocks             |
        --------------------------------------
  001C  |            FirstDirect             |
        --------------------------------------
 


Field Summary
protected  long accessTime
           
protected  long blocks
           
protected  long changedTime
           
protected  long firstDirect
           
protected  int groupId
           
protected  int mode
           
protected  long modifyTime
           
protected  int numLinks
           
protected  long size
           
protected  int userId
           
 
Fields inherited from class rossi.fstools.fs.reiserfs.Item
block, buffer, bufferOffset, header
 
Fields inherited from interface rossi.fstools.fs.Inode
BLOCKDEV_MODE, CHARDEV_MODE, DIRECTORY_MODE, FIFO_MODE, FILE_MODE, FILETYPE_MASK, SOCKET_MODE, SYMLINK_MODE
 
Constructor Summary
StatDataV1(byte[] buffer, int bufferOffset, LeafNode block, ItemHead header)
           
 
Method Summary
 long getAccessTime()
          Get the time the data was last accessed.
 long getBlocks()
           
 long getChangedTime()
          Get the time this Inode metadata was last changed.
static int getDataSize()
           
 long getFirstDirect()
           
 long getGroupId()
          Get the group id of the object's owner.
 int getMode()
          Get the mode of the object.
 long getModifyTime()
          Get the time the data was last modified.
 long getNumLinks()
          Get the number of hard links to this file.
 int getRDev()
          Get the device major/minor numbers.
 long getSize()
          Get the size of the data associated with the object.
 long getUserId()
          Get the user id of the object's owner.
 void load()
           
 void setAccessTime(long aAccessTime)
           
 void setBlocks(long aBlocks)
           
 void setChangedTime(long aChangedTime)
           
 void setFirstDirect(long aFirstDirect)
           
 void setGroupId(long aGroupId)
           
 void setMode(int aMode)
          Set the mode.
 void setModifyTime(long aModifyTime)
           
 void setNumLinks(long aNumLinks)
           
 void setSize(long aSize)
           
 void setUserId(long aUserId)
           
 
Methods inherited from class rossi.fstools.fs.reiserfs.StatDataItem
create, toString
 
Methods inherited from class rossi.fstools.fs.reiserfs.Item
getBlock, getBlockPointer, getBuffer, getBufferOffset, getHeader, getRawData, setBlock, setBuffer, setBufferOffset, setHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mode

protected int mode

numLinks

protected int numLinks

userId

protected int userId

groupId

protected int groupId

size

protected long size

accessTime

protected long accessTime

modifyTime

protected long modifyTime

changedTime

protected long changedTime

blocks

protected long blocks

firstDirect

protected long firstDirect
Constructor Detail

StatDataV1

public StatDataV1(byte[] buffer,
                  int bufferOffset,
                  LeafNode block,
                  ItemHead header)
           throws FsException
Method Detail

getDataSize

public static int getDataSize()

getMode

public int getMode()
Description copied from interface: Inode
Get the mode of the object. The least significant 12 bits control the object's access permissions. The next 4 bits control the type of the object.

Specified by:
getMode in interface Inode
Specified by:
getMode in class StatDataItem

setMode

public void setMode(int aMode)
Description copied from interface: Inode
Set the mode.

Specified by:
setMode in interface Inode
Specified by:
setMode in class StatDataItem

getNumLinks

public long getNumLinks()
Description copied from interface: Inode
Get the number of hard links to this file. A value of zero indicates that the object is deleted. A hard link is a directory entry pointing directly at this object (not via symlinks).

Specified by:
getNumLinks in interface Inode
Specified by:
getNumLinks in class StatDataItem

setNumLinks

public void setNumLinks(long aNumLinks)
Specified by:
setNumLinks in interface Inode
Specified by:
setNumLinks in class StatDataItem

getUserId

public long getUserId()
Description copied from interface: Inode
Get the user id of the object's owner.

Specified by:
getUserId in interface Inode
Specified by:
getUserId in class StatDataItem

setUserId

public void setUserId(long aUserId)
Specified by:
setUserId in interface Inode
Specified by:
setUserId in class StatDataItem

getGroupId

public long getGroupId()
Description copied from interface: Inode
Get the group id of the object's owner.

Specified by:
getGroupId in interface Inode
Specified by:
getGroupId in class StatDataItem

setGroupId

public void setGroupId(long aGroupId)
Specified by:
setGroupId in interface Inode
Specified by:
setGroupId in class StatDataItem

getSize

public long getSize()
Description copied from interface: Inode
Get the size of the data associated with the object. This is mostly meaningful with normal files.

Specified by:
getSize in interface Inode
Specified by:
getSize in class StatDataItem

setSize

public void setSize(long aSize)
Specified by:
setSize in interface Inode
Specified by:
setSize in class StatDataItem

getAccessTime

public long getAccessTime()
Description copied from interface: Inode
Get the time the data was last accessed.

Specified by:
getAccessTime in interface Inode
Specified by:
getAccessTime in class StatDataItem

setAccessTime

public void setAccessTime(long aAccessTime)
Specified by:
setAccessTime in interface Inode
Specified by:
setAccessTime in class StatDataItem

getModifyTime

public long getModifyTime()
Description copied from interface: Inode
Get the time the data was last modified.

Specified by:
getModifyTime in interface Inode
Specified by:
getModifyTime in class StatDataItem

setModifyTime

public void setModifyTime(long aModifyTime)
Specified by:
setModifyTime in interface Inode
Specified by:
setModifyTime in class StatDataItem

getChangedTime

public long getChangedTime()
Description copied from interface: Inode
Get the time this Inode metadata was last changed.

Specified by:
getChangedTime in interface Inode
Specified by:
getChangedTime in class StatDataItem

setChangedTime

public void setChangedTime(long aChangedTime)
Specified by:
setChangedTime in interface Inode
Specified by:
setChangedTime in class StatDataItem

getBlocks

public long getBlocks()
Specified by:
getBlocks in class StatDataItem

setBlocks

public void setBlocks(long aBlocks)
Specified by:
setBlocks in class StatDataItem

getFirstDirect

public long getFirstDirect()

setFirstDirect

public void setFirstDirect(long aFirstDirect)

getRDev

public int getRDev()
Description copied from class: StatDataItem
Get the device major/minor numbers.

Specified by:
getRDev in class StatDataItem

load

public void load()
          throws FsException
Throws:
FsException