|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.fs.permission.FsPermission
public class FsPermission
A class for file/directory permissions.
Field Summary | |
---|---|
static int |
DEFAULT_UMASK
|
static String |
UMASK_LABEL
umask property label |
Constructor Summary | |
---|---|
FsPermission(FsAction u,
FsAction g,
FsAction o)
Construct by the given FsAction . |
|
FsPermission(FsPermission other)
Copy constructor |
|
FsPermission(short mode)
Construct by the given mode. |
Method Summary | |
---|---|
FsPermission |
applyUMask(FsPermission umask)
Apply a umask to this permission and return a new one |
static FsPermission |
createImmutable(short permission)
Create an immutable FsPermission object. |
boolean |
equals(Object obj)
|
void |
fromShort(short n)
|
static FsPermission |
getDefault()
Get the default permission. |
FsAction |
getGroupAction()
Return group FsAction . |
FsAction |
getOtherAction()
Return other FsAction . |
static FsPermission |
getUMask(Configuration conf)
Get the user file creation mask (umask) |
FsAction |
getUserAction()
Return user FsAction . |
int |
hashCode()
|
static FsPermission |
read(DataInput in)
Create and initialize a FsPermission from DataInput . |
void |
readFields(DataInput in)
Deserialize the fields of this object from in . |
static void |
setUMask(Configuration conf,
FsPermission umask)
Set the user file creation mask (umask) |
short |
toShort()
Encode the object to a short. |
String |
toString()
|
static FsPermission |
valueOf(String unixSymbolicPermission)
Create a FsPermission from a Unix symbolic permission string |
void |
write(DataOutput out)
Serialize the fields of this object to out . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String UMASK_LABEL
public static final int DEFAULT_UMASK
Constructor Detail |
---|
public FsPermission(FsAction u, FsAction g, FsAction o)
FsAction
.
u
- user actiong
- group actiono
- other actionpublic FsPermission(short mode)
mode
- toShort()
public FsPermission(FsPermission other)
other
- other permissionMethod Detail |
---|
public static FsPermission createImmutable(short permission)
FsPermission
object.
public FsAction getUserAction()
FsAction
.
public FsAction getGroupAction()
FsAction
.
public FsAction getOtherAction()
FsAction
.
public void fromShort(short n)
public void write(DataOutput out) throws IOException
out
.
write
in interface Writable
out
- DataOuput
to serialize this object into.
IOException
public void readFields(DataInput in) throws IOException
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
in interface Writable
in
- DataInput
to deseriablize this object from.
IOException
public static FsPermission read(DataInput in) throws IOException
FsPermission
from DataInput
.
IOException
public short toShort()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public FsPermission applyUMask(FsPermission umask)
public static FsPermission getUMask(Configuration conf)
public static void setUMask(Configuration conf, FsPermission umask)
public static FsPermission getDefault()
public static FsPermission valueOf(String unixSymbolicPermission)
unixSymbolicPermission
- e.g. "-rw-rw-rw-"
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |