com.myJava.file.metadata.posix.jni
Class JNIMetaDataAccessor

java.lang.Object
  extended by com.myJava.file.metadata.posix.jni.JNIMetaDataAccessor
All Implemented Interfaces:
FileMetaDataAccessor

public class JNIMetaDataAccessor
extends java.lang.Object
implements FileMetaDataAccessor

Metadata accessor that uses JNI to invoke C functions.
It handles basic attributes (owner, group, permissions, sticky bit, set uid, set gid), extended attributers and ACLs.

Author:
Olivier PETRUCCI

Areca Build ID : 7299034069467778562

Constructor Summary
JNIMetaDataAccessor()
           
 
Method Summary
 boolean ACLSupported()
          Is the accessor able to handle ACL ?
 FileMetaData buildEmptyMetaData()
          Return an empty instance of meta data
 boolean extendedAttributesSupported()
          Is the accessor able to handle extended attributes ?
 boolean extendedMetaDataSupported()
           
 java.lang.String getDescription()
          Return a description of the accessor
 FileMetaData getMetaData(java.io.File f, boolean onlyBasicAttributes)
          Return the meta data for the requested file
 FileMetaDataSerializer getMetaDataSerializer()
          Return a FileMetaDataSerializer which is compatible with the metadata produced by this accessor.
 boolean isNonStandardFile(java.io.File file)
          Is the file a non standard file (pipes, socket, block special files, ...) ?
 boolean isSymLink(java.io.File file)
          Is the file a symbolic link ?
 boolean nonStandardFilesSupported()
          Is the accessor able to distinguish between standard files / directories and non standard files (pipes, socket, block special files, ...) ?
 void setMetaData(java.io.File f, FileMetaData abstractAttr)
          Set the file's meta data
 boolean symLinksSupported()
          Is the accessor able to distinguish between standard files / directories and symbolic links ?
 boolean test()
          Test whether the accessor is compatible with the current system or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNIMetaDataAccessor

public JNIMetaDataAccessor()
Method Detail

getMetaData

public FileMetaData getMetaData(java.io.File f,
                                boolean onlyBasicAttributes)
                         throws java.io.IOException
Description copied from interface: FileMetaDataAccessor
Return the meta data for the requested file

Specified by:
getMetaData in interface FileMetaDataAccessor
Throws:
java.io.IOException

getMetaDataSerializer

public FileMetaDataSerializer getMetaDataSerializer()
Description copied from interface: FileMetaDataAccessor
Return a FileMetaDataSerializer which is compatible with the metadata produced by this accessor.

Specified by:
getMetaDataSerializer in interface FileMetaDataAccessor

buildEmptyMetaData

public FileMetaData buildEmptyMetaData()
Description copied from interface: FileMetaDataAccessor
Return an empty instance of meta data

Specified by:
buildEmptyMetaData in interface FileMetaDataAccessor

setMetaData

public void setMetaData(java.io.File f,
                        FileMetaData abstractAttr)
                 throws java.io.IOException
Description copied from interface: FileMetaDataAccessor
Set the file's meta data

Specified by:
setMetaData in interface FileMetaDataAccessor
Throws:
java.io.IOException

isNonStandardFile

public boolean isNonStandardFile(java.io.File file)
                          throws java.io.IOException
Description copied from interface: FileMetaDataAccessor
Is the file a non standard file (pipes, socket, block special files, ...) ?

Specified by:
isNonStandardFile in interface FileMetaDataAccessor
Throws:
java.io.IOException

isSymLink

public boolean isSymLink(java.io.File file)
                  throws java.io.IOException
Description copied from interface: FileMetaDataAccessor
Is the file a symbolic link ?

Specified by:
isSymLink in interface FileMetaDataAccessor
Throws:
java.io.IOException

nonStandardFilesSupported

public boolean nonStandardFilesSupported()
Description copied from interface: FileMetaDataAccessor
Is the accessor able to distinguish between standard files / directories and non standard files (pipes, socket, block special files, ...) ?

Specified by:
nonStandardFilesSupported in interface FileMetaDataAccessor

symLinksSupported

public boolean symLinksSupported()
Description copied from interface: FileMetaDataAccessor
Is the accessor able to distinguish between standard files / directories and symbolic links ?

Specified by:
symLinksSupported in interface FileMetaDataAccessor

extendedMetaDataSupported

public boolean extendedMetaDataSupported()

ACLSupported

public boolean ACLSupported()
Description copied from interface: FileMetaDataAccessor
Is the accessor able to handle ACL ?

Specified by:
ACLSupported in interface FileMetaDataAccessor

extendedAttributesSupported

public boolean extendedAttributesSupported()
Description copied from interface: FileMetaDataAccessor
Is the accessor able to handle extended attributes ?

Specified by:
extendedAttributesSupported in interface FileMetaDataAccessor

test

public boolean test()
Description copied from interface: FileMetaDataAccessor
Test whether the accessor is compatible with the current system or not.
This method may be useful if native code is used.

Specified by:
test in interface FileMetaDataAccessor

getDescription

public java.lang.String getDescription()
Description copied from interface: FileMetaDataAccessor
Return a description of the accessor

Specified by:
getDescription in interface FileMetaDataAccessor