public interface FileRepo extends ProofDisposedListener
Modifier and Type | Method and Description |
---|---|
java.io.OutputStream |
createOutputStream(java.nio.file.Path path)
This method can be used to write a file that has no counterpart outside to the FileRepo.
|
java.io.InputStream |
getInputStream(java.nio.file.Path path)
Provides access to a file on disk.
|
java.io.InputStream |
getInputStream(RuleSource ruleSource)
Provides access to the InputStream of a RuleSource.
|
java.io.InputStream |
getInputStream(java.net.URL url)
Provides access to the InputStream of a file identified by an URL.
|
void |
registerProof(Proof proof)
Register the proof in the FileRepo.
|
void |
setBaseDir(java.nio.file.Path path)
Sets the base directory of the proof, i.e.
|
void |
setBootClassPath(java.io.File path)
Sets the bootclasspath (containing available classes from the Java Class Library).
|
void |
setClassPath(java.util.List<java.io.File> classPath)
Sets the classpath.
|
void |
setJavaPath(java.lang.String javaPath)
Sets the java path (where the source files are located).
|
proofDisposed, proofDisposing
java.io.InputStream getInputStream(java.nio.file.Path path) throws java.io.FileNotFoundException, java.io.IOException
null
if the path cannot be handled by this repository.path
- the path of the filenull
java.io.FileNotFoundException
- if the file does not existjava.io.IOException
- on IO errors, e.g. if the user has no permission to read the filejava.io.InputStream getInputStream(RuleSource ruleSource) throws java.io.IOException
null
if the source cannot be handled by this repository.ruleSource
- the RuleSourcenull
java.io.IOException
- on IO errorsjava.io.InputStream getInputStream(java.net.URL url) throws java.io.IOException
null
if the url cannot be handled by this repository.url
- the URL of the filenull
java.io.IOException
- on IO errorsjava.io.OutputStream createOutputStream(java.nio.file.Path path) throws java.io.FileNotFoundException
path
- the path of the file to store. The path must be relative to the base directory
of the proof package.java.io.FileNotFoundException
- if a file with the given path existsvoid registerProof(Proof proof)
proof
- the proof to registervoid setBootClassPath(java.io.File path) throws java.lang.IllegalStateException
path
- the bootclasspath to set (the method does nothing if null is given)java.lang.IllegalStateException
- if the java path is already setvoid setClassPath(java.util.List<java.io.File> classPath) throws java.lang.IllegalStateException
classPath
- the classpath to set (the method does nothing if null is given)java.lang.IllegalStateException
- if the java path is already setvoid setJavaPath(java.lang.String javaPath) throws java.lang.IllegalStateException
javaPath
- the java path to set (the method does nothing if null is given)java.lang.IllegalStateException
- if the java path is already setvoid setBaseDir(java.nio.file.Path path)
path
- The path of the base directory. If a file is given, then its parent directory is
set as base path.Copyright © 2003-2019 The KeY-Project.