public class FileStatus extends Object implements Writable, Comparable
构造器和说明 |
---|
FileStatus() |
FileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
String owner,
String group,
Path path) |
FileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
Path path) |
限定符和类型 | 方法和说明 |
---|---|
int |
compareTo(Object o)
Compare this object to another object
|
boolean |
equals(Object o)
Compare if this object is equal to another object
|
long |
getAccessTime()
Get the access time of the file.
|
long |
getBlockSize()
Get the block size of the file.
|
String |
getGroup()
Get the group associated with the file.
|
long |
getLen() |
long |
getModificationTime()
Get the modification time of the file.
|
String |
getOwner()
Get the owner of the file.
|
Path |
getPath() |
FsPermission |
getPermission()
Get FsPermission associated with the file.
|
short |
getReplication()
Get the replication factor of a file.
|
int |
hashCode()
Returns a hash code value for the object, which is defined as
the hash code of the path name.
|
boolean |
isDir()
Is this a directory?
|
void |
readFields(DataInput in)
Deserialize the fields of this object from
in . |
protected void |
setGroup(String group)
Sets group.
|
protected void |
setOwner(String owner)
Sets owner.
|
protected void |
setPermission(FsPermission permission)
Sets permission.
|
void |
write(DataOutput out)
Serialize the fields of this object to
out . |
public FileStatus()
public FileStatus(long length, boolean isdir, int block_replication, long blocksize, long modification_time, Path path)
public FileStatus(long length, boolean isdir, int block_replication, long blocksize, long modification_time, long access_time, FsPermission permission, String owner, String group, Path path)
public long getLen()
public boolean isDir()
public long getBlockSize()
public short getReplication()
public long getModificationTime()
public long getAccessTime()
public FsPermission getPermission()
public String getOwner()
public String getGroup()
public Path getPath()
protected void setPermission(FsPermission permission)
permission
- if permission is null, default value is setprotected void setOwner(String owner)
owner
- if it is null, default value is setprotected void setGroup(String group)
group
- if it is null, default value is setpublic void write(DataOutput out) throws IOException
Writable
out
.write
在接口中 Writable
out
- DataOuput
to serialize this object into.IOException
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
在接口中 Writable
in
- DataInput
to deseriablize this object from.IOException
public int compareTo(Object o)
compareTo
在接口中 Comparable
o
- the object to be compared.ClassCastException
- if the specified object's is not of
type FileStatuspublic boolean equals(Object o)
Copyright © 2009 The Apache Software Foundation