public void open(boolean readonly) {

        fileFreePosition = 0;

        try {
            dataFile = ScaledRAFile.newScaledRAFile(database, fileName,
                    readonly, ScaledRAFile.DATA_FILE_RAF, null, null);
            fileFreePosition = dataFile.length();

            if (fileFreePosition > Integer.MAX_VALUE) {
                throw new HsqlException("", "", 0);
            }

            initBuffers();
        } catch (Exception e) {
            throw Error.error(ErrorCode.FILE_IO_ERROR,
                              ErrorCode.M_TextCache_openning_file_error,
                              new Object[] {
                fileName, e
            });
        }

        cacheReadonly = readonly;
    }
public void open ( boolean readonly ) { fileFreePosition = 0 ; try { dataFile = ScaledRAFile . newScaledRAFile ( database , fileName , readonly , ScaledRAFile . DATA_FILE_RAF , null , null ) ; fileFreePosition = dataFile . length ( ) ; if ( fileFreePosition > Integer . MAX_VALUE ) { throw new HsqlException ( "" , "" , 0 ) ; } initBuffers ( ) ; } catch ( Exception e ) { throw Error . error ( ErrorCode . FILE_IO_ERROR , ErrorCode . M_TextCache_openning_file_error , new Object [ ] { fileName , e } ) ; } cacheReadonly = readonly ; }
Opens a data source file.