|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.schlichtherle.io.AbstractArchiveDetector
public abstract class AbstractArchiveDetector
Implements the FileFactory
part of the ArchiveDetector
interface.
Field Summary |
---|
Fields inherited from interface de.schlichtherle.io.ArchiveDetector |
---|
ALL, DEFAULT, NULL |
Constructor Summary | |
---|---|
AbstractArchiveDetector()
|
Method Summary | |
---|---|
File |
createFile(File blueprint)
Constructs a new File instance from the given
blueprint . |
File |
createFile(File delegate,
File innerArchive)
This factory method is not for public use - do not use it! |
File |
createFile(File blueprint,
File delegate,
File enclArchive)
This factory method is not for public use - do not use it! |
File |
createFile(File parent,
String child)
Constructs a new File instance which uses this
ArchiveDetector to detect any archive files in its pathname. |
File |
createFile(String pathName)
Constructs a new File instance which uses this
ArchiveDetector to detect any archive files in its pathname. |
File |
createFile(String parent,
String child)
Constructs a new File instance which uses this
ArchiveDetector to detect any archive files in its pathname. |
File |
createFile(URI uri)
Constructs a new File instance from the given
uri . |
FileInputStream |
createFileInputStream(File file)
Creates a new FileInputStream to read the content of the
given file. |
FileOutputStream |
createFileOutputStream(File file,
boolean append)
Creates a new FileOutputStream to write the new content of the
given file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.schlichtherle.io.ArchiveDetector |
---|
getArchiveDriver |
Constructor Detail |
---|
public AbstractArchiveDetector()
Method Detail |
---|
public File createFile(File blueprint)
ArchiveDetector
File
instance from the given
blueprint
.
createFile
in interface ArchiveDetector
createFile
in interface FileFactory
blueprint
- The file to use as a blueprint. If this is an instance
of the File
class, its fields are simply copied.
File
.public File createFile(File delegate, File innerArchive)
ArchiveDetector
createFile
in interface ArchiveDetector
createFile
in interface FileFactory
public File createFile(File blueprint, File delegate, File enclArchive)
ArchiveDetector
createFile
in interface ArchiveDetector
createFile
in interface FileFactory
public File createFile(File parent, String child)
ArchiveDetector
File
instance which uses this
ArchiveDetector
to detect any archive files in its pathname.
createFile
in interface ArchiveDetector
createFile
in interface FileFactory
parent
- The parent pathname as a File
.child
- The child pathname as a String
.
File
.public File createFile(String pathName)
ArchiveDetector
File
instance which uses this
ArchiveDetector
to detect any archive files in its pathname.
createFile
in interface ArchiveDetector
createFile
in interface FileFactory
pathName
- The pathname of the file.
File
.public File createFile(String parent, String child)
ArchiveDetector
File
instance which uses this
ArchiveDetector
to detect any archive files in its pathname.
createFile
in interface ArchiveDetector
createFile
in interface FileFactory
parent
- The parent pathname as a String
.child
- The child pathname as a String
.
File
.public File createFile(URI uri)
ArchiveDetector
File
instance from the given
uri
. This method behaves similar to
new java.io.File(uri)
with the following
amendment:
If the URI matches the pattern
(jar:)*file:(path!/)*entry
, then the
constructed file object treats the URI like a (possibly ZIPped) file.
The newly created File
instance uses this
ArchiveDetector
to detect any archive files in its pathname.
createFile
in interface ArchiveDetector
createFile
in interface FileFactory
uri
- an absolute, hierarchical URI with a scheme equal to
file
or jar
, a non-empty path component,
and undefined authority, query, and fragment components.
File
.public FileInputStream createFileInputStream(File file) throws FileNotFoundException
ArchiveDetector
FileInputStream
to read the content of the
given file.
createFileInputStream
in interface ArchiveDetector
createFileInputStream
in interface FileFactory
file
- The file to read.
FileInputStream
.
FileNotFoundException
- On any I/O related issue when opening the file.public FileOutputStream createFileOutputStream(File file, boolean append) throws FileNotFoundException
ArchiveDetector
FileOutputStream
to write the new content of the
given file.
createFileOutputStream
in interface ArchiveDetector
createFileOutputStream
in interface FileFactory
file
- The file to write.append
- If true
the new content should be appended
to the old content rather than overwriting it.
FileOutputStream
.
FileNotFoundException
- On any I/O related issue when opening the file.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |