public class FileResource extends Object implements Resource
| Constructor and Description |
|---|
FileResource(File file) |
FileResource(Path path) |
FileResource(Resource r)
Turn a resource into a file so that anything in the conversion is
properly caught
|
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
buffer() |
void |
close() |
void |
deleteOnClose(boolean b) |
String |
getExtra() |
File |
getFile() |
long |
lastModified() |
InputStream |
openInputStream() |
void |
setExtra(String extra) |
long |
size() |
String |
toString() |
void |
write(OutputStream out) |
public FileResource(File file) throws IOException
IOExceptionpublic FileResource(Path path) throws IOException
IOExceptionpublic ByteBuffer buffer() throws Exception
public InputStream openInputStream() throws Exception
openInputStream in interface ResourceExceptionpublic void write(OutputStream out) throws Exception
public long lastModified()
lastModified in interface Resourcepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void deleteOnClose(boolean b)
public File getFile()
Copyright © 2019 aQute SARL. All rights reserved.