Package org.openide.filesystems

Examples of org.openide.filesystems.FileLock.releaseLock()


                    ois.close();
                } catch (IOException e) {
                }
            }
            if (lock != null) {
                lock.releaseLock();
            }
        }
    }
}
View Full Code Here


                //Rename temp file
                FileObject tempFileObject = FileUtil.toFileObject(writeFile);
                FileLock lock = tempFileObject.lock();
                tempFileObject.rename(lock, name, ext);
                lock.releaseLock();
            } else if (cancel) {
                //Delete temp file
                FileObject tempFileObject = FileUtil.toFileObject(writeFile);
                tempFileObject.delete();
            }
View Full Code Here

                 "before building the Parcel Recipe");
                TopManager.getDefault().notify(d);
            }
            finally {
                if (lock != null) {
                    lock.releaseLock();
                }
            }
        }
    }
}
View Full Code Here

                    }
                    FileLock lock = buildImpl.lock();
                    try {
                        buildImpl.rename(lock, name, backupext);
                    } finally {
                        lock.releaseLock();
                    }
                }
            }
            saveLibrariesLocation();
            // Store properties
View Full Code Here

        try {
            to = new OutputStreamWriter(someFile.getOutputStream(lock), FileEncodingQuery.getEncoding(someFile));
            to.write(content.toString());
        } finally {
            IOUtils.closeQuietly(to);
            lock.releaseLock();
        }
    }

    protected List<String> breakdownLine(final String line, final int maxLenght) {
        assert line != null && maxLenght > 0;
View Full Code Here

                            FileUtil.copy(zip, out);
                        } finally {
                            out.close();
                        }
                    } finally {
                        lock.releaseLock();
                    }
                }
            }
        } finally {
            zip.close();
View Full Code Here

                XMLUtil.write(doc, os, "UTF-8"); // NOI18N
            } finally {
                os.close();
            }
        } finally {
            lock.releaseLock();
        }
    }
   
}
View Full Code Here

                 "before building the Parcel Recipe");
                TopManager.getDefault().notify(d);
            }
            finally {
                if (lock != null) {
                    lock.releaseLock();
                }
            }
        }
    }
}
View Full Code Here

                    writer.write(buffer.toString());
                } finally {
                    writer.close();
                }
            } finally {
                lock.releaseLock();
            }
            return target;
        }

        private void addLibraryToWebModule(WebModule wm, String libraryName) {
View Full Code Here

                bw.write(content);
            } finally {
                bw.close();
            }
        } finally {
            lock.releaseLock();
        }
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.