public class DirectoryPackageOutput extends java.lang.Object implements PackageOutput
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
directory |
private java.io.OutputStream |
out |
| Constructor and Description |
|---|
DirectoryPackageOutput(java.lang.String directory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the package.
|
private boolean |
deleteRecursive(java.io.File path) |
java.io.OutputStream |
getOutputStream()
Gets the output stream for current entry.
|
java.lang.String |
getSeparator()
Returns file separator used by the PackageOutput.
|
java.lang.String |
joinPath(java.lang.String path,
java.lang.String name)
Joins path and name.
|
void |
nextEntry(java.lang.String name)
Start a new entry in the package with the given name.
|
void |
nextEntry(java.lang.String path,
java.lang.String name)
Start a new entry in the package with the given path and name.
|
void |
removeEntry(java.lang.String name)
Ensure entry will be removed.
|
void |
removeEntry(java.lang.String path,
java.lang.String name)
Ensure entry will be removed.
|
public void nextEntry(java.lang.String name)
throws java.io.IOException
PackageOutputnextEntry in interface PackageOutputjava.io.IOExceptionpublic void nextEntry(java.lang.String path,
java.lang.String name)
throws java.io.IOException
PackageOutputnextEntry in interface PackageOutputjava.io.IOExceptionpublic void removeEntry(java.lang.String name)
throws java.io.IOException
PackageOutputremoveEntry in interface PackageOutputjava.io.IOExceptionpublic void removeEntry(java.lang.String path,
java.lang.String name)
throws java.io.IOException
PackageOutputremoveEntry in interface PackageOutputjava.io.IOExceptionprivate boolean deleteRecursive(java.io.File path)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic void close()
throws java.io.IOException
PackageOutputclose in interface PackageOutputjava.io.IOExceptionpublic java.io.OutputStream getOutputStream()
throws java.io.IOException
PackageOutputgetOutputStream in interface PackageOutputjava.io.IOExceptionpublic java.lang.String getSeparator()
PackageOutputgetSeparator in interface PackageOutputpublic java.lang.String joinPath(java.lang.String path,
java.lang.String name)
PackageOutputjoinPath in interface PackageOutputCopyright 2004-2015 Wandora Team