Tabnine Logo
FileUtils$FileLock.RefCntInc
Code IndexAdd Tabnine to your IDE (free)

How to use
RefCntInc
method
in
com.lody.virtual.helper.utils.FileUtils$FileLock

Best Java code snippets using com.lody.virtual.helper.utils.FileUtils$FileLock.RefCntInc (Showing top 3 results out of 315)

origin: android-hacker/VirtualXposed

public boolean LockExclusive(File targetFile) {
  if (targetFile == null) {
    return false;
  }
  try {
    File lockFile = new File(targetFile.getParentFile().getAbsolutePath().concat("/lock"));
    if (!lockFile.exists()) {
      lockFile.createNewFile();
    }
    RandomAccessFile randomAccessFile = new RandomAccessFile(lockFile.getAbsolutePath(), "rw");
    FileChannel channel = randomAccessFile.getChannel();
    java.nio.channels.FileLock lock = channel.lock();
    if (!lock.isValid()) {
      return false;
    }
    RefCntInc(lockFile.getAbsolutePath(), lock, randomAccessFile, channel);
    return true;
  } catch (Exception e) {
    return false;
  }
}
origin: darkskygit/VirtualApp

public boolean LockExclusive(File targetFile) {
  if (targetFile == null) {
    return false;
  }
  try {
    File lockFile = new File(targetFile.getParentFile().getAbsolutePath().concat("/lock"));
    if (!lockFile.exists()) {
      lockFile.createNewFile();
    }
    RandomAccessFile randomAccessFile = new RandomAccessFile(lockFile.getAbsolutePath(), "rw");
    FileChannel channel = randomAccessFile.getChannel();
    java.nio.channels.FileLock lock = channel.lock();
    if (!lock.isValid()) {
      return false;
    }
    RefCntInc(lockFile.getAbsolutePath(), lock, randomAccessFile, channel);
    return true;
  } catch (Exception e) {
    return false;
  }
}
origin: bzsome/VirtualApp-x326

public boolean LockExclusive(File targetFile) {
  if (targetFile == null) {
    return false;
  }
  try {
    File lockFile = new File(targetFile.getParentFile().getAbsolutePath().concat("/lock"));
    if (!lockFile.exists()) {
      lockFile.createNewFile();
    }
    RandomAccessFile randomAccessFile = new RandomAccessFile(lockFile.getAbsolutePath(), "rw");
    FileChannel channel = randomAccessFile.getChannel();
    java.nio.channels.FileLock lock = channel.lock();
    if (!lock.isValid()) {
      return false;
    }
    RefCntInc(lockFile.getAbsolutePath(), lock, randomAccessFile, channel);
    return true;
  } catch (Exception e) {
    return false;
  }
}
com.lody.virtual.helper.utilsFileUtils$FileLockRefCntInc

Popular methods of FileUtils$FileLock

  • <init>
  • RefCntDec

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JTable (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now