Code example for FileLock

Methods: release

0
      } catch (RuntimeException ex) {
        Log.e("Got exception when reading magic, id = %d, disk full or mount read-only? %s", id, ex.getClass().toString());
      } finally { 
        try { 
          if (lock != null)
            lock.release();
        } catch (IOException ex) {
        } 
      } 
    } 
    return 0; 
  } 
 
  protected synchronized void saveMiniThumbToFile(byte[] data, long id, long magic) throws IOException {
    RandomAccessFile r = miniThumbDataFile();
    if (r == null)
      return; 
 
    long pos = id * BYTES_PER_MINTHUMB;
    FileLock lock = null;
Connect your IDE to all the code out there  Get Codota for Java