public int write ( String words ) { if ( mode . isWritable ( ) == false ) throw new IllegalStateException ( "IOError: not opened for writing" ) ; try { raFile . write ( words . getBytes ( ) ) ; } catch ( IOException e ) { logger . log ( Level . SEVERE , null , e ) ; throw new RuntimeException ( e ) ; } return words . getBytes ( ) . length ; }
Writes to the file .