@Override
    @SuppressWarnings("empty-statement")
    public boolean savePrefs() throws IOException {
        String rawData = toString();
        byte[] data = rawData.getBytes();
        FileOutputStream fileOut = null;
        
        try {
            fileOut = new FileOutputStream(prefsFile);
            fileOut.write(data);
        } finally {
            fileOut.close();
            FileInputStream fileIn = new FileInputStream(prefsFile);
            byte[] inputData = new byte[40960];
            while (fileIn.read(inputData, 0, 4096) != -1);
            if (!new String(inputData).equals(rawData))
                return false;
        }
        
        return true;
    }