8264112: (fs) Reorder methods/constructor/fields in UnixUserDefinedFileAttributeView.java
Reviewed-by: alanb
This commit is contained in:
parent
9061271b0b
commit
604b14c43d
@ -49,6 +49,14 @@ abstract class UnixUserDefinedFileAttributeView
|
||||
private static final int MIN_LISTXATTR_BUF_SIZE = 1024;
|
||||
private static final int MAX_LISTXATTR_BUF_SIZE = 32 * 1024;
|
||||
|
||||
private final UnixPath file;
|
||||
private final boolean followLinks;
|
||||
|
||||
UnixUserDefinedFileAttributeView(UnixPath file, boolean followLinks) {
|
||||
this.file = file;
|
||||
this.followLinks = followLinks;
|
||||
}
|
||||
|
||||
private byte[] nameAsBytes(UnixPath file, String name) throws IOException {
|
||||
if (name == null)
|
||||
throw new NullPointerException("'name' is null");
|
||||
@ -61,6 +69,11 @@ abstract class UnixUserDefinedFileAttributeView
|
||||
return bytes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the maximum supported length of xattr names (in bytes, including namespace)
|
||||
*/
|
||||
protected abstract int maxNameLength();
|
||||
|
||||
// Parses buffer as array of NULL-terminated C strings.
|
||||
private static List<String> asList(long address, int size) {
|
||||
List<String> list = new ArrayList<>();
|
||||
@ -97,19 +110,6 @@ abstract class UnixUserDefinedFileAttributeView
|
||||
}
|
||||
}
|
||||
|
||||
private final UnixPath file;
|
||||
private final boolean followLinks;
|
||||
|
||||
UnixUserDefinedFileAttributeView(UnixPath file, boolean followLinks) {
|
||||
this.file = file;
|
||||
this.followLinks = followLinks;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the maximum supported length of xattr names (in bytes, including namespace)
|
||||
*/
|
||||
protected abstract int maxNameLength();
|
||||
|
||||
@Override
|
||||
public List<String> list() throws IOException {
|
||||
if (System.getSecurityManager() != null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user