congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
FileResource.deleteOnClose
Code IndexAdd Tabnine to your IDE (free)

How to use
deleteOnClose
method
in
aQute.bnd.osgi.FileResource

Best Java code snippets using aQute.bnd.osgi.FileResource.deleteOnClose (Showing top 4 results out of 315)

origin: biz.aQute.bnd/bndlib

/**
 * Turn a resource into a file so that anything in the conversion is properly caught
 * @param r
 * @throws Exception
 */
public FileResource(Resource r) throws Exception {
  this.file = File.createTempFile("fileresource", ".resource");
  deleteOnClose(true);
  this.file.deleteOnExit();
  IO.copy(r.openInputStream(), this.file);
}
origin: biz.aQute.bnd/bnd

/**
 * Turn a resource into a file so that anything in the conversion is properly caught
 * @param r
 * @throws Exception
 */
public FileResource(Resource r) throws Exception {
  this.file = File.createTempFile("fileresource", ".resource");
  deleteOnClose(true);
  this.file.deleteOnExit();
  IO.copy(r.openInputStream(), this.file);
}
origin: biz.aQute.bnd/biz.aQute.bndlib

/**
 * Turn a resource into a file so that anything in the conversion is
 * properly caught
 * 
 * @param r
 * @throws Exception
 */
public FileResource(Resource r) throws Exception {
  file = Files.createTempFile("fileresource", ".resource");
  deleteOnClose(true);
  file.toFile()
    .deleteOnExit();
  try (OutputStream out = IO.outputStream(file)) {
    r.write(out);
  }
  lastModified = r.lastModified();
  size = Files.size(file);
}
origin: biz.aQute.bnd/biz.aQute.bnd

/**
 * Turn a resource into a file so that anything in the conversion is
 * properly caught
 * 
 * @param r
 * @throws Exception
 */
public FileResource(Resource r) throws Exception {
  file = Files.createTempFile("fileresource", ".resource");
  deleteOnClose(true);
  file.toFile()
    .deleteOnExit();
  try (OutputStream out = IO.outputStream(file)) {
    r.write(out);
  }
  lastModified = r.lastModified();
  size = Files.size(file);
}
aQute.bnd.osgiFileResourcedeleteOnClose

Popular methods of FileResource

  • <init>
  • build
  • copy
  • traverse
  • buffer
  • getFile

Popular in Java

  • Updating database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • getContentResolver (Context)
  • getSupportFragmentManager (FragmentActivity)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JCheckBox (javax.swing)
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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