aQute.bnd.osgi
Class FileResource

java.lang.Object
  extended by aQute.bnd.osgi.FileResource
All Implemented Interfaces:
Resource, Closeable

public class FileResource
extends Object
implements Resource, Closeable


Constructor Summary
FileResource(File file)
           
FileResource(Resource r)
          Turn a resource into a file so that anything in the conversion is properly caught
 
Method Summary
static void build(Jar jar, File directory, Pattern doNotCopy)
           
 void close()
           
 void deleteOnClose(boolean b)
           
protected  void finalize()
           
 String getExtra()
           
 File getFile()
           
 long lastModified()
           
 InputStream openInputStream()
           
 void setExtra(String extra)
           
 long size()
           
 String toString()
           
 void write(OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileResource

public FileResource(File file)

FileResource

public FileResource(Resource r)
             throws Exception
Turn a resource into a file so that anything in the conversion is properly caught

Parameters:
r -
Throws:
Exception
Method Detail

openInputStream

public InputStream openInputStream()
                            throws FileNotFoundException
Specified by:
openInputStream in interface Resource
Throws:
FileNotFoundException

build

public static void build(Jar jar,
                         File directory,
                         Pattern doNotCopy)

toString

public String toString()
Overrides:
toString in class Object

write

public void write(OutputStream out)
           throws Exception
Specified by:
write in interface Resource
Throws:
Exception

lastModified

public long lastModified()
Specified by:
lastModified in interface Resource

getExtra

public String getExtra()
Specified by:
getExtra in interface Resource

setExtra

public void setExtra(String extra)
Specified by:
setExtra in interface Resource

size

public long size()
Specified by:
size in interface Resource

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

deleteOnClose

public void deleteOnClose(boolean b)

getFile

public File getFile()

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable


Copyright © 2014 aQute SARL. All rights reserved.