@NotThreadSafe public class UfsFileStatus extends UfsStatus
UnderFileSystem
.Modifier and Type | Field and Description |
---|---|
static String |
INVALID_CONTENT_HASH |
protected long |
mBlockSize |
protected String |
mContentHash |
protected long |
mContentLength |
static long |
UNKNOWN_BLOCK_SIZE |
mGroup, mIsDirectory, mLastModifiedTimeMs, mMode, mName, mOwner, mXAttr
Constructor and Description |
---|
UfsFileStatus(String name,
String contentHash,
long contentLength,
long lastModifiedTimeMs,
String owner,
String group,
short mode)
Deprecated.
as of 2.1.0, use
UfsFileStatus(String, String, long, long, String, String, short, long) . |
UfsFileStatus(String name,
String contentHash,
long contentLength,
long lastModifiedTimeMs,
String owner,
String group,
short mode,
long blockSize)
Creates new instance of
UfsFileStatus without any extended attributes. |
UfsFileStatus(String name,
String contentHash,
long contentLength,
long lastModifiedTimeMs,
String owner,
String group,
short mode,
Map<String,byte[]> xAttr)
Deprecated.
|
UfsFileStatus(String name,
String contentHash,
long contentLength,
long lastModifiedTimeMs,
String owner,
String group,
short mode,
Map<String,byte[]> xAttr,
long blockSize)
Creates new instance of
UfsFileStatus . |
UfsFileStatus(UfsFileStatus status)
Creates a new instance of
UfsFileStatus as a copy. |
Modifier and Type | Method and Description |
---|---|
UfsFileStatus |
copy()
Create a copy of
UfsStatus . |
long |
getBlockSize() |
String |
getContentHash() |
long |
getContentLength()
Get the content size in bytes.
|
String |
toString() |
convertToNames, equals, getGroup, getLastModifiedTime, getMode, getName, getOwner, getXAttr, hashCode, isDirectory, isFile, setName, toStringHelper
public static final String INVALID_CONTENT_HASH
public static final long UNKNOWN_BLOCK_SIZE
protected final String mContentHash
protected final long mContentLength
protected final long mBlockSize
public UfsFileStatus(String name, String contentHash, long contentLength, long lastModifiedTimeMs, String owner, String group, short mode, @Nullable Map<String,byte[]> xAttr, long blockSize)
UfsFileStatus
.name
- relative path of filecontentHash
- hash of the file contentscontentLength
- in byteslastModifiedTimeMs
- UTC timeowner
- of the filegroup
- of the filemode
- of the filexAttr
- extended attributes, if anyblockSize
- blocksize, -1 if unknownpublic UfsFileStatus(String name, String contentHash, long contentLength, long lastModifiedTimeMs, String owner, String group, short mode, long blockSize)
UfsFileStatus
without any extended attributes.name
- relative path of filecontentHash
- hash of the file contentscontentLength
- in byteslastModifiedTimeMs
- UTC timeowner
- of the filegroup
- of the filemode
- of the fileblockSize
- blocksize, -1 if unknown@Deprecated public UfsFileStatus(String name, String contentHash, long contentLength, long lastModifiedTimeMs, String owner, String group, short mode, @Nullable Map<String,byte[]> xAttr)
UfsFileStatus(String, String, long, long, String, String, short, Map, long)
UfsFileStatus
.name
- relative path of filecontentHash
- hash of the file contentscontentLength
- in byteslastModifiedTimeMs
- UTC timeowner
- of the filegroup
- of the filemode
- of the filexAttr
- extended attributes, if any@Deprecated public UfsFileStatus(String name, String contentHash, long contentLength, long lastModifiedTimeMs, String owner, String group, short mode)
UfsFileStatus(String, String, long, long, String, String, short, long)
.UfsFileStatus
without any extended attributes.name
- relative path of filecontentHash
- hash of the file contentscontentLength
- in byteslastModifiedTimeMs
- UTC timeowner
- of the filegroup
- of the filemode
- of the filepublic UfsFileStatus(UfsFileStatus status)
UfsFileStatus
as a copy.status
- file information to copypublic UfsFileStatus copy()
UfsStatus
UfsStatus
.public String getContentHash()
public long getContentLength()
public long getBlockSize()
Copyright © 2023. All Rights Reserved.