Package com.sun.jna.platform.linux
Class XAttrUtil
java.lang.Object
com.sun.jna.platform.linux.XAttrUtil
Utility functions class for handling file extended attributes on Linux.
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringGet extended attribute value.static StringGet extended attribute value.static MemoryfGetXAttrAsMemory(int fd, String name) Get extended attribute value.static byte[]fGetXAttrBytes(int fd, String name) Get extended attribute value.static Collection<String>fListXAttr(int fd) List extended attributes on file.static Collection<String>fListXAttr(int fd, String encoding) List extended attributes on file.static voidfRemoveXAttr(int fd, String name) Remove extended attribute from file.static voidSet or replace value of extended attribute.static voidSet or replace value of extended attribute.static voidSet or replace value of extended attribute.static StringGet extended attribute value.static StringGet extended attribute value.static MemorygetXAttrAsMemory(String path, String name) Get extended attribute value.static byte[]getXAttrBytes(String path, String name) Get extended attribute value.static StringGet extended attribute value but in case of symbolic link get the value from the link itself instead of linked file.static StringGet extended attribute value but in case of symbolic link get the value from the link itself instead of linked file.static MemorylGetXAttrAsMemory(String path, String name) Get extended attribute value but in case of symbolic link get the value from the link itself instead of linked file.static byte[]lGetXAttrBytes(String path, String name) Get extended attribute value but in case of symbolic link get the value from the link itself instead of linked file.static Collection<String>List extended attributes on file.static Collection<String>List extended attributes on file.static Collection<String>lListXAttr(String path) List extended attributes on file but in case of symbolic link get extended attributes of the link itself instead of linked file.static Collection<String>lListXAttr(String path, String encoding) List extended attributes on file but in case of symbolic link get extended attributes of the link itself instead of linked file.static voidlRemoveXAttr(String path, String name) Remove extended attribute from file but in case of symbolic link remove extended attribute from the link itself instead of linked file.static voidSet or replace value of extended attribute but in case of symbolic link set the extended attribute on the link itself instead linked file.static voidSet or replace value of extended attribute but in case of symbolic link set the extended attribute on the link itself instead linked file.static voidSet or replace value of extended attribute but in case of symbolic link set the extended attribute on the link itself instead linked file.static voidremoveXAttr(String path, String name) Remove extended attribute from file.static voidSet or replace value of extended attribute.static voidSet or replace value of extended attribute.static voidSet or replace value of extended attribute.
- 
Method Details- 
setXAttrSet or replace value of extended attribute.- Parameters:
- path- file path
- name- extended attribute name
- value- value to set
- Throws:
- IOException- on any error
 
- 
setXAttrpublic static void setXAttr(String path, String name, String value, String encoding) throws IOException Set or replace value of extended attribute.- Parameters:
- path- file path
- name- extended attribute name
- value- value to set
- encoding- character encoding to be used for stored value
- Throws:
- IOException- on any error
 
- 
setXAttrSet or replace value of extended attribute.- Parameters:
- path- file path
- name- extended attribute name
- value- value to set
- Throws:
- IOException- on any error
 
- 
lSetXAttrSet or replace value of extended attribute but in case of symbolic link set the extended attribute on the link itself instead linked file.- Parameters:
- path- file path
- name- extended attribute name
- value- value to set
- Throws:
- IOException- on any error
 
- 
lSetXAttrpublic static void lSetXAttr(String path, String name, String value, String encoding) throws IOException Set or replace value of extended attribute but in case of symbolic link set the extended attribute on the link itself instead linked file.- Parameters:
- path- file path
- name- extended attribute name
- value- value to set
- encoding- character encoding to be used for stored value
- Throws:
- IOException- on any error
 
- 
lSetXAttrSet or replace value of extended attribute but in case of symbolic link set the extended attribute on the link itself instead linked file.- Parameters:
- path- file path
- name- extended attribute name
- value- value to set
- Throws:
- IOException- on any error
 
- 
fSetXAttrSet or replace value of extended attribute.- Parameters:
- fd- file handle
- name- extended attribute name
- value- value to set
- Throws:
- IOException- on any error
 
- 
fSetXAttrSet or replace value of extended attribute.- Parameters:
- fd- file handle
- name- extended attribute name
- value- value to set
- encoding- character encoding to be used for stored value
- Throws:
- IOException- on any error
 
- 
fSetXAttrSet or replace value of extended attribute.- Parameters:
- fd- file handle
- name- extended attribute name
- value- value to set
- Throws:
- IOException- on any error
 
- 
getXAttrGet extended attribute value.- Parameters:
- path- file path
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
getXAttrGet extended attribute value.- Parameters:
- path- file path
- name- extended attribute name
- encoding- character encoding to be used to decode stored extended attribute value
- Returns:
- extended attribute value
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
getXAttrBytesGet extended attribute value.- Parameters:
- path- file path
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
getXAttrAsMemoryGet extended attribute value.- Parameters:
- path- file path
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
lGetXAttrGet extended attribute value but in case of symbolic link get the value from the link itself instead of linked file.- Parameters:
- path- file path
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
lGetXAttrGet extended attribute value but in case of symbolic link get the value from the link itself instead of linked file.- Parameters:
- path- file path
- name- extended attribute name
- encoding- character encoding to be used to decode stored extended attribute value
- Returns:
- extended attribute value
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
lGetXAttrBytesGet extended attribute value but in case of symbolic link get the value from the link itself instead of linked file.- Parameters:
- path- file path
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
lGetXAttrAsMemoryGet extended attribute value but in case of symbolic link get the value from the link itself instead of linked file.- Parameters:
- path- file path
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
fGetXAttrGet extended attribute value.- Parameters:
- fd- file handle
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
fGetXAttrGet extended attribute value.- Parameters:
- fd- file handle
- name- extended attribute name
- encoding- character encoding to be used to decode stored extended attribute value
- Returns:
- extended attribute value
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
fGetXAttrBytesGet extended attribute value.- Parameters:
- fd- file handle
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
fGetXAttrAsMemoryGet extended attribute value.- Parameters:
- fd- file handle
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
listXAttrList extended attributes on file.- Parameters:
- path- file path
- Returns:
- collection of extended attributes' names
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
listXAttrList extended attributes on file.- Parameters:
- path- file path
- encoding- character encoding use to decode extended attributes' names
- Returns:
- collection of extended attributes' names
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
lListXAttrList extended attributes on file but in case of symbolic link get extended attributes of the link itself instead of linked file.- Parameters:
- path- file path
- Returns:
- collection of extended attributes' names
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
lListXAttrList extended attributes on file but in case of symbolic link get extended attributes of the link itself instead of linked file.- Parameters:
- path- file path
- encoding- character encoding use to decode extended attributes' names
- Returns:
- collection of extended attributes' names
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
fListXAttrList extended attributes on file.- Parameters:
- fd- file handle
- Returns:
- collection of extended attributes' names
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
fListXAttrList extended attributes on file.- Parameters:
- fd- file handle
- encoding- character encoding use to decode extended attributes' names
- Returns:
- collection of extended attributes' names
- Throws:
- IOException- on any error except- ERANGEwhich handled internally
 
- 
removeXAttrRemove extended attribute from file.- Parameters:
- path- file path
- name- extended attribute name
- Throws:
- IOException- on any error
 
- 
lRemoveXAttrRemove extended attribute from file but in case of symbolic link remove extended attribute from the link itself instead of linked file.- Parameters:
- path- file path
- name- extended attribute name
- Throws:
- IOException- on any error
 
- 
fRemoveXAttrRemove extended attribute from file.- Parameters:
- fd- file handle
- name- extended attribute name
- Throws:
- IOException- on any error
 
 
-