Package soot
Class FoundFile
- java.lang.Object
-
- soot.FoundFile
-
- All Implemented Interfaces:
IFoundFile
public class FoundFile extends Object implements IFoundFile
-
-
Field Summary
Fields Modifier and Type Field Description protected StringentryNameprotected Filefileprotected List<InputStream>openedInputStreamsprotected Pathpathprotected ZipEntryzipEntryprotected SharedCloseable<ZipFile>zipFile
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes all opened input streams.protected voidcloseZipFile(List<Exception> errs)StringgetAbsolutePath()Returns the absolute path to the file or the zip file.FilegetFile()Returns the concrete file on disk if it is not within a zip file.StringgetFilePath()ZipFilegetZipFile()Returns the zip file or null.InputStreaminputStream()Opens the file and returns a new input stream containing the file contents.booleanisZipFile()Returns true if and only if this file is contained within a zip file.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface soot.IFoundFile
silentClose
-
-
-
-
Field Detail
-
openedInputStreams
protected final List<InputStream> openedInputStreams
-
path
protected Path path
-
file
protected File file
-
entryName
protected String entryName
-
zipFile
protected SharedCloseable<ZipFile> zipFile
-
zipEntry
protected ZipEntry zipEntry
-
-
Method Detail
-
getFilePath
public String getFilePath()
- Specified by:
getFilePathin interfaceIFoundFile
-
isZipFile
public boolean isZipFile()
Description copied from interface:IFoundFileReturns true if and only if this file is contained within a zip file.- Specified by:
isZipFilein interfaceIFoundFile
-
getZipFile
public ZipFile getZipFile()
Description copied from interface:IFoundFileReturns the zip file or null.- Specified by:
getZipFilein interfaceIFoundFile- Returns:
- the zip file
-
getFile
public File getFile()
Description copied from interface:IFoundFileReturns the concrete file on disk if it is not within a zip file. Otherwise, the returned file is the zip file itself. Note that it may return null in some circumstances.- Specified by:
getFilein interfaceIFoundFile- Returns:
- the file on disk
-
getAbsolutePath
public String getAbsolutePath()
Description copied from interface:IFoundFileReturns the absolute path to the file or the zip file.- Specified by:
getAbsolutePathin interfaceIFoundFile- Returns:
- the absolute path to the file or the zip file.
-
inputStream
public InputStream inputStream()
Description copied from interface:IFoundFileOpens the file and returns a new input stream containing the file contents.- Specified by:
inputStreamin interfaceIFoundFile- Returns:
- a fresh stream
-
close
public void close()
Description copied from interface:IFoundFileCloses all opened input streams.- Specified by:
closein interfaceIFoundFile
-
-