Secure iNet Factory

com.jscape.inet.file
Class JFilePermissions

java.lang.Object
  extended by com.jscape.inet.file.JFilePermissions

public class JFilePermissions
extends java.lang.Object

POSIX file permissions. Contains permissions for owner, owner group and other.

Version:
1.0
Author:
Alex Usun

Nested Class Summary
static class JFilePermissions.Permission
          Represents Unix object permission.
 
Constructor Summary
JFilePermissions(int value)
          Creates a new Unix permissions object from its integer representation.
JFilePermissions(JFileType type, JFilePermissions.Permission ownerPermission, JFilePermissions.Permission groupPermission, JFilePermissions.Permission otherPermission)
           
JFilePermissions(java.lang.String value)
          Creates a new Unix permissions object from its string representation.
 
Method Summary
 JFilePermissions.Permission getGroupPermission()
          Obatins object group permission.
 JFilePermissions.Permission getOtherPermission()
          Obtains object other permission.
 JFilePermissions.Permission getOwnerPermission()
          Obtains object owner permission.
 JFileType getType()
          Obtains file type.
 int intValue()
          Obtains integer representation of the current permissions.
 java.lang.String toString()
          Obtains string representation of the object permissions as for example "rw-r--r--".
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JFilePermissions

public JFilePermissions(JFileType type,
                        JFilePermissions.Permission ownerPermission,
                        JFilePermissions.Permission groupPermission,
                        JFilePermissions.Permission otherPermission)
Parameters:
type -
ownerPermission -
groupPermission -
otherPermission -

JFilePermissions

public JFilePermissions(int value)
Creates a new Unix permissions object from its integer representation.

Parameters:
value - permissions integer representation

JFilePermissions

public JFilePermissions(java.lang.String value)
Creates a new Unix permissions object from its string representation.

Parameters:
value - valid string permissions representation, for example: "rw-r--r--"
Method Detail

getType

public JFileType getType()
Obtains file type.

Returns:
file type.

getOwnerPermission

public JFilePermissions.Permission getOwnerPermission()
Obtains object owner permission.

Returns:
owner permission

getGroupPermission

public JFilePermissions.Permission getGroupPermission()
Obatins object group permission.

Returns:
group permission

getOtherPermission

public JFilePermissions.Permission getOtherPermission()
Obtains object other permission.

Returns:
other permission

intValue

public int intValue()
Obtains integer representation of the current permissions.

Returns:
integer representation of the current permissions

toString

public java.lang.String toString()
Obtains string representation of the object permissions as for example "rw-r--r--".

Overrides:
toString in class java.lang.Object
Returns:
string representation of the object permissions

Secure iNet Factory

Copyright © JSCAPE LLC. 1999-2014. All Rights Reserved