Class Filesystem

java.lang.Object
com.basis.filesystem.Filesystem

public class Filesystem extends Object
This is the main interface class with the major Filesystem constants. It is also how the user gets a ConnectionMgr to use in making Filesystem calls.
  • Field Details

    • MODE_APPEND

      public static final int MODE_APPEND
      Append mode -- for STRING files.
      See Also:
    • MODE_TRUNC

      public static final int MODE_TRUNC
      Truncate mode -- for STRING files.
      See Also:
    • MODE_CREATE

      public static final int MODE_CREATE
      Create mode -- for STRING files.
      See Also:
    • MODE_EXCL

      public static final int MODE_EXCL
      Exclusive mode -- for STRING files.
      See Also:
    • MODE_RDONLY

      public static final int MODE_RDONLY
      Read only mode -- for all files.
      See Also:
    • MAX_RECORD_SIZE

      public static final int MAX_RECORD_SIZE
      Maximum record size.
      See Also:
    • MAX_KEY_SIZE

      @Deprecated public static final int MAX_KEY_SIZE
      Deprecated.
      Maximum key size for MKEYED files.
      See Also:
    • INDEXED_FILE

      public static final int INDEXED_FILE
      INDEXED file type.
      See Also:
    • SERIAL_FILE

      public static final int SERIAL_FILE
      SERIAL file type.
      See Also:
    • DIRECT_FILE

      public static final int DIRECT_FILE
      DIRECT/SORT file type.
      See Also:
    • STRING_FILE

      public static final int STRING_FILE
      STRING file type.
      See Also:
    • PROGRAM_FILE

      public static final int PROGRAM_FILE
      PROGRAM file type.
      See Also:
    • DIRECTORY_FILE

      public static final int DIRECTORY_FILE
      DIRECTORY file type.
      See Also:
    • MKEYED_FILE

      public static final int MKEYED_FILE
      MKEYED file type.
      See Also:
    • CISAM_FILE

      public static final int CISAM_FILE
      C-ISAM old file type not supported by BBj.
      See Also:
    • XKEYED_FILE

      public static final int XKEYED_FILE
      XKEYED file type.
      See Also:
    • TEXTSEARCH_FILE

      public static final int TEXTSEARCH_FILE
      TEXTSEARCH
      See Also:
    • JKEYED_FILE

      public static final int JKEYED_FILE
      JKEYED file type.
      See Also:
    • CRYPT_FILE

      public static final int CRYPT_FILE
      Encrypted file type, you should only see this opening in binary mode without decryption.
      See Also:
    • VKEYED_FILE

      public static final int VKEYED_FILE
      VKEYED file type.
      See Also:
    • MAX_FILE_TYPE

      public static final int MAX_FILE_TYPE
      Max file type.
      See Also:
    • MKEYED_4GIG

      public static final int MKEYED_4GIG
      Modifier for a 4 Gig MKEYED file.
      See Also:
    • MKEYED_TAGRECORD

      public static final int MKEYED_TAGRECORD
      Modifier for a tagged record file.
      See Also:
    • MKEYED_64BIT

      public static final int MKEYED_64BIT
      Modifier for a 64-bit file.
      See Also:
    • ORDERED_NUMERIC_KEY

      public static final int ORDERED_NUMERIC_KEY
      Modifier for ordered numeric key segments.
      See Also:
    • TYPEMASK

      public static final int TYPEMASK
      Mask to get type signature out of the file type byte of the header.
      See Also:
    • LOCAL_SERVER_PROPERTY

      public static final String LOCAL_SERVER_PROPERTY
      See Also:
    • LOCAL_PORT_PROPERTY

      public static final String LOCAL_PORT_PROPERTY
      See Also:
    • FORCE_LOCAL_PROPERTY

      public static final String FORCE_LOCAL_PROPERTY
      See Also:
    • DEFAULT_LOCAL_SERVER

      public static final String DEFAULT_LOCAL_SERVER
      See Also:
    • DEFAULT_CREATE_AUTH_CLIENT_CONTEXT

      public static final Filesystem.CreateAuthClientContext DEFAULT_CREATE_AUTH_CLIENT_CONTEXT
  • Method Details

    • fileTypeToString

      public static String fileTypeToString(int p_type)
    • setDirectConnectionMgr

      public static void setDirectConnectionMgr(Class<? extends com.basis.filesystem.remote.DirectConnectionMgr> p_direct)
      Set the class for the lowest ConnectionMgr access. This method is used internally to initialize the ConnectionMgr for access. End users should never call this method.
      Parameters:
      p_direct - Class for the lowest level ConnectionMgr.
    • getConnectionMgr

      public static ConnectionMgr getConnectionMgr()
      Get a ConnectionMgr for use in making Filesystem calls.
    • getConnectionMgr

      public static ConnectionMgr getConnectionMgr(Filesystem.CreateAuthClientContext p_createAuthContext)
      Get a ConnectionMgr for use in making Filesystem calls.
    • getConnectionMgr

      public static ConnectionMgr getConnectionMgr(Filesystem.CreateAuthClientContext p_createAuthContext, InetAddress p_licenseHost, int p_licensePort, boolean p_ssl, boolean p_remoteLicense)
      Get a ConnectionMgr for use in making Filesystem calls. This method lets the user specify a remote filesystem server to use for licensing and local file access.
    • isAbsolute

      public static boolean isAbsolute(String p_filename)
      Determine whether is path should be considered absolute.
      Parameters:
      p_filename - File name to check.
    • modesIntToString

      public static String modesIntToString(int p_mode)
      Create a mode string from the modes that files care about.
    • getServerFilename

      public static String getServerFilename(String p_filename, boolean p_remote)
    • isLoopback

      public static boolean isLoopback(InetAddress p_addr)
      Is a given IP address the loopback address. This is actually harder to check than it seams at first glance. The method checks both IPv4 and IPv6.
      Parameters:
      p_addr - InetAddress to check.
    • isLoopback

      public static boolean isLoopback(SocketAddress p_address)
    • getLoopback

      public static InetAddress getLoopback()
      Get the machine loopback address.
    • getIPv4Loopback

      public static InetAddress getIPv4Loopback()
      Get one of the IPv4 loopback addresses.
    • getIPv6Loopback

      public static InetAddress getIPv6Loopback()
      Get the IPv6 loopback address.