docs: static Storage newScaledRAFile(Database database, String name,
                                     boolean readonly, int type,
                                     String classname,
                                     String key)
                                     throws FileNotFoundException, IOException {
  
          if (classname != null) {
              try {
                  Class       zclass      = Class.forName(classname);
                  Constructor constructor = zclass.getConstructor(new Class[] {
                      String.class, Boolean.class, Object.class
                  });
  
                  return (Storage) constructor.newInstance(new Object[] {
                      name, new Boolean(readonly), key
                  });
              } catch (ClassNotFoundException e) {
                  throw new IOException();
              } catch (NoSuchMethodException e) {
                  throw new IOException();
              } catch (InstantiationException e) {
                  throw new IOException();
              } catch (IllegalAccessException e) {
                  throw new IOException();
              } catch (java.lang.reflect.InvocationTargetException e) {
                  throw new IOException();
              }
          }
  
          if (type == DATA_FILE_JAR) {
              return new ScaledRAFileInJar(name);
          } else if (type == DATA_FILE_RAF) {
              return new ScaledRAFile(database, name, readonly);
          } else {
              RandomAccessFile file = new RandomAccessFile(name, readonly ? "r"
                                                                          : "rw");
  
              if (file.length() > MAX_NIO_LENGTH) {
                  return new ScaledRAFile(database, name, file, readonly);
              } else {
                  file.close();
              }
  
              try {
                  Class.forName("java.nio.MappedByteBuffer");
  
                  Class c =
                      Class.forName("org.hsqldb_voltpatches.persist.ScaledRAFileHybrid");
                  Constructor constructor = c.getConstructor(new Class[] {
                      Database.class, String.class, boolean.class
                  });
  
                  return (ScaledRAInterface) constructor.newInstance(
                      new Object[] {
                      database, name, new Boolean(readonly)
                  });
              } catch (Exception e) {
                  return new ScaledRAFile(database, name, readonly);
              }
          }
      }