public class ZipFileSpecification extends Object implements IZipFileSpecification
Constructor and Description |
---|
ZipFileSpecification(File file) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this archive
|
Reader |
createReader()
Creates a new Reader for the contents of file.
|
Iterator<String> |
getEntries()
Returns an iterator to the names of all the entries in this zip file
|
InputStream |
getEntryStream(String name)
Creates a stream to a given entry within the SWC file
|
long |
getLastModified()
Get the last modified timestamp of the file
|
String |
getPath()
Returns the path of the file.
|
boolean |
hasEntry(String entryName)
Determines if the given entry exists within this archive
|
boolean |
isOpenDocument() |
public ZipFileSpecification(File file) throws ZipException, IOException
ZipException
IOException
public Iterator<String> getEntries()
IZipFileSpecification
getEntries
in interface IZipFileSpecification
Iterator
public InputStream getEntryStream(String name) throws IOException
IZipFileSpecification
getEntryStream
in interface IZipFileSpecification
name
- the name of the entry we wantInputStream
or nullIOException
public void close() throws IOException
IZipFileSpecification
close
in interface Closeable
close
in interface AutoCloseable
close
in interface IZipFileSpecification
IOException
public boolean hasEntry(String entryName)
IZipFileSpecification
hasEntry
in interface IZipFileSpecification
entryName
- the name of the entrypublic Reader createReader() throws FileNotFoundException
IFileSpecification
createReader
in interface IFileSpecification
FileNotFoundException
public long getLastModified()
IFileSpecification
getLastModified
in interface IFileSpecification
public String getPath()
IFileSpecification
getPath
in interface IFileSpecification
public boolean isOpenDocument()
isOpenDocument
in interface IFileSpecification
IFileSpecification.createReader()
method returns a reader that reads the live
document buffer.Copyright © 2016 The Apache Software Foundation. All rights reserved.