Package com.sun.jna.platform.linux
Class XAttrUtil
- java.lang.Object
- 
- com.sun.jna.platform.linux.XAttrUtil
 
- 
 public abstract class XAttrUtil extends java.lang.ObjectUtility functions class for handling file extended attributes on Linux.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringfGetXAttr(int fd, java.lang.String name)Get extended attribute value.static java.lang.StringfGetXAttr(int fd, java.lang.String name, java.lang.String encoding)Get extended attribute value.static MemoryfGetXAttrAsMemory(int fd, java.lang.String name)Get extended attribute value.static byte[]fGetXAttrBytes(int fd, java.lang.String name)Get extended attribute value.static java.util.Collection<java.lang.String>fListXAttr(int fd)List extended attributes on file.static java.util.Collection<java.lang.String>fListXAttr(int fd, java.lang.String encoding)List extended attributes on file.static voidfRemoveXAttr(int fd, java.lang.String name)Remove extended attribute from file.static voidfSetXAttr(int fd, java.lang.String name, byte[] value)Set or replace value of extended attribute.static voidfSetXAttr(int fd, java.lang.String name, java.lang.String value)Set or replace value of extended attribute.static voidfSetXAttr(int fd, java.lang.String name, java.lang.String value, java.lang.String encoding)Set or replace value of extended attribute.static java.lang.StringgetXAttr(java.lang.String path, java.lang.String name)Get extended attribute value.static java.lang.StringgetXAttr(java.lang.String path, java.lang.String name, java.lang.String encoding)Get extended attribute value.static MemorygetXAttrAsMemory(java.lang.String path, java.lang.String name)Get extended attribute value.static byte[]getXAttrBytes(java.lang.String path, java.lang.String name)Get extended attribute value.static java.lang.StringlGetXAttr(java.lang.String path, java.lang.String name)Get extended attribute value but in case of symbolic link get the value from the link itself instead of linked file.static java.lang.StringlGetXAttr(java.lang.String path, java.lang.String name, java.lang.String encoding)Get extended attribute value but in case of symbolic link get the value from the link itself instead of linked file.static MemorylGetXAttrAsMemory(java.lang.String path, java.lang.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(java.lang.String path, java.lang.String name)Get extended attribute value but in case of symbolic link get the value from the link itself instead of linked file.static java.util.Collection<java.lang.String>listXAttr(java.lang.String path)List extended attributes on file.static java.util.Collection<java.lang.String>listXAttr(java.lang.String path, java.lang.String encoding)List extended attributes on file.static java.util.Collection<java.lang.String>lListXAttr(java.lang.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 java.util.Collection<java.lang.String>lListXAttr(java.lang.String path, java.lang.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(java.lang.String path, java.lang.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 voidlSetXAttr(java.lang.String path, java.lang.String name, byte[] value)Set or replace value of extended attribute but in case of symbolic link set the extended attribute on the link itself instead linked file.static voidlSetXAttr(java.lang.String path, java.lang.String name, java.lang.String value)Set or replace value of extended attribute but in case of symbolic link set the extended attribute on the link itself instead linked file.static voidlSetXAttr(java.lang.String path, java.lang.String name, java.lang.String value, java.lang.String encoding)Set 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(java.lang.String path, java.lang.String name)Remove extended attribute from file.static voidsetXAttr(java.lang.String path, java.lang.String name, byte[] value)Set or replace value of extended attribute.static voidsetXAttr(java.lang.String path, java.lang.String name, java.lang.String value)Set or replace value of extended attribute.static voidsetXAttr(java.lang.String path, java.lang.String name, java.lang.String value, java.lang.String encoding)Set or replace value of extended attribute.
 
- 
- 
- 
Method Detail- 
setXAttrpublic static void setXAttr(java.lang.String path, java.lang.String name, java.lang.String value) throws java.io.IOExceptionSet or replace value of extended attribute.- Parameters:
- path- file path
- name- extended attribute name
- value- value to set
- Throws:
- java.io.IOException- on any error
 
 - 
setXAttrpublic static void setXAttr(java.lang.String path, java.lang.String name, java.lang.String value, java.lang.String encoding) throws java.io.IOExceptionSet 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:
- java.io.IOException- on any error
 
 - 
setXAttrpublic static void setXAttr(java.lang.String path, java.lang.String name, byte[] value) throws java.io.IOExceptionSet or replace value of extended attribute.- Parameters:
- path- file path
- name- extended attribute name
- value- value to set
- Throws:
- java.io.IOException- on any error
 
 - 
lSetXAttrpublic static void lSetXAttr(java.lang.String path, java.lang.String name, java.lang.String value) throws java.io.IOExceptionSet 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:
- java.io.IOException- on any error
 
 - 
lSetXAttrpublic static void lSetXAttr(java.lang.String path, java.lang.String name, java.lang.String value, java.lang.String encoding) throws java.io.IOExceptionSet 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:
- java.io.IOException- on any error
 
 - 
lSetXAttrpublic static void lSetXAttr(java.lang.String path, java.lang.String name, byte[] value) throws java.io.IOExceptionSet 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:
- java.io.IOException- on any error
 
 - 
fSetXAttrpublic static void fSetXAttr(int fd, java.lang.String name, java.lang.String value) throws java.io.IOExceptionSet or replace value of extended attribute.- Parameters:
- fd- file handle
- name- extended attribute name
- value- value to set
- Throws:
- java.io.IOException- on any error
 
 - 
fSetXAttrpublic static void fSetXAttr(int fd, java.lang.String name, java.lang.String value, java.lang.String encoding) throws java.io.IOExceptionSet 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:
- java.io.IOException- on any error
 
 - 
fSetXAttrpublic static void fSetXAttr(int fd, java.lang.String name, byte[] value) throws java.io.IOExceptionSet or replace value of extended attribute.- Parameters:
- fd- file handle
- name- extended attribute name
- value- value to set
- Throws:
- java.io.IOException- on any error
 
 - 
getXAttrpublic static java.lang.String getXAttr(java.lang.String path, java.lang.String name) throws java.io.IOExceptionGet extended attribute value.- Parameters:
- path- file path
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
getXAttrpublic static java.lang.String getXAttr(java.lang.String path, java.lang.String name, java.lang.String encoding) throws java.io.IOExceptionGet 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:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
getXAttrBytespublic static byte[] getXAttrBytes(java.lang.String path, java.lang.String name) throws java.io.IOExceptionGet extended attribute value.- Parameters:
- path- file path
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
getXAttrAsMemorypublic static Memory getXAttrAsMemory(java.lang.String path, java.lang.String name) throws java.io.IOException Get extended attribute value.- Parameters:
- path- file path
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
lGetXAttrpublic static java.lang.String lGetXAttr(java.lang.String path, java.lang.String name) throws java.io.IOExceptionGet 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:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
lGetXAttrpublic static java.lang.String lGetXAttr(java.lang.String path, java.lang.String name, java.lang.String encoding) throws java.io.IOExceptionGet 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:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
lGetXAttrBytespublic static byte[] lGetXAttrBytes(java.lang.String path, java.lang.String name) throws java.io.IOExceptionGet 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:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
lGetXAttrAsMemorypublic static Memory lGetXAttrAsMemory(java.lang.String path, java.lang.String name) throws java.io.IOException Get 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:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
fGetXAttrpublic static java.lang.String fGetXAttr(int fd, java.lang.String name) throws java.io.IOExceptionGet extended attribute value.- Parameters:
- fd- file handle
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
fGetXAttrpublic static java.lang.String fGetXAttr(int fd, java.lang.String name, java.lang.String encoding) throws java.io.IOExceptionGet 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:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
fGetXAttrBytespublic static byte[] fGetXAttrBytes(int fd, java.lang.String name) throws java.io.IOExceptionGet extended attribute value.- Parameters:
- fd- file handle
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
fGetXAttrAsMemorypublic static Memory fGetXAttrAsMemory(int fd, java.lang.String name) throws java.io.IOException Get extended attribute value.- Parameters:
- fd- file handle
- name- extended attribute name
- Returns:
- extended attribute value
- Throws:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
listXAttrpublic static java.util.Collection<java.lang.String> listXAttr(java.lang.String path) throws java.io.IOExceptionList extended attributes on file.- Parameters:
- path- file path
- Returns:
- collection of extended attributes' names
- Throws:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
listXAttrpublic static java.util.Collection<java.lang.String> listXAttr(java.lang.String path, java.lang.String encoding) throws java.io.IOExceptionList extended attributes on file.- Parameters:
- path- file path
- encoding- character encoding use to decode extended attributes' names
- Returns:
- collection of extended attributes' names
- Throws:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
lListXAttrpublic static java.util.Collection<java.lang.String> lListXAttr(java.lang.String path) throws java.io.IOExceptionList 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:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
lListXAttrpublic static java.util.Collection<java.lang.String> lListXAttr(java.lang.String path, java.lang.String encoding) throws java.io.IOExceptionList 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:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
fListXAttrpublic static java.util.Collection<java.lang.String> fListXAttr(int fd) throws java.io.IOExceptionList extended attributes on file.- Parameters:
- fd- file handle
- Returns:
- collection of extended attributes' names
- Throws:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
fListXAttrpublic static java.util.Collection<java.lang.String> fListXAttr(int fd, java.lang.String encoding) throws java.io.IOExceptionList extended attributes on file.- Parameters:
- fd- file handle
- encoding- character encoding use to decode extended attributes' names
- Returns:
- collection of extended attributes' names
- Throws:
- java.io.IOException- on any error except- ERANGEwhich handled internally
 
 - 
removeXAttrpublic static void removeXAttr(java.lang.String path, java.lang.String name) throws java.io.IOExceptionRemove extended attribute from file.- Parameters:
- path- file path
- name- extended attribute name
- Throws:
- java.io.IOException- on any error
 
 - 
lRemoveXAttrpublic static void lRemoveXAttr(java.lang.String path, java.lang.String name) throws java.io.IOExceptionRemove 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:
- java.io.IOException- on any error
 
 - 
fRemoveXAttrpublic static void fRemoveXAttr(int fd, java.lang.String name) throws java.io.IOExceptionRemove extended attribute from file.- Parameters:
- fd- file handle
- name- extended attribute name
- Throws:
- java.io.IOException- on any error
 
 
- 
 
-