| Modifier and Type | Class and Description |
|---|---|
static class |
MFileZip.Provider |
| Constructor and Description |
|---|
MFileZip(java.lang.String filename) |
MFileZip(java.util.zip.ZipFile file) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MFile o) |
boolean |
exists()
Check if the MFile exists
|
java.lang.Object |
getAuxInfo() |
MFileZip |
getChild(java.lang.String newFilename)
Get child MFile of this MFile
|
java.io.InputStream |
getInputStream()
Get the MFile InputStream
|
long |
getLastModified()
Get time of last modification at the time the MFile object was created
|
java.util.List<java.util.zip.ZipEntry> |
getLeafEntries() |
long |
getLength()
Size of file in bytes
|
java.lang.String |
getName()
The name is the farthest element from the root in the directory hierarchy.
|
MFile |
getParent()
Get the parent of this
|
java.lang.String |
getPath()
Get full path name, replace \\ with /
|
java.nio.file.Path |
getRelativePath() |
java.nio.file.Path |
getRootPath() |
boolean |
isDirectory() |
boolean |
isReadable() |
boolean |
isZipFile()
Check if this MFile is a zip file
|
java.lang.String |
relativize(MFile other)
Construct a relative path between this MFile and a given MFile.
|
void |
setAuxInfo(java.lang.Object info) |
void |
writeToStream(java.io.OutputStream outputStream)
Write the MFile to an OutputStream
|
void |
writeToStream(java.io.OutputStream outputStream,
long offset,
long maxBytes)
Write the MFile to an OutputStream
|
public MFileZip(java.util.zip.ZipFile file)
throws java.io.IOException
java.io.IOExceptionpublic MFileZip(java.lang.String filename)
throws java.io.IOException
java.io.IOExceptionpublic long getLastModified()
MFilegetLastModified in interface MFilepublic long getLength()
MFilepublic boolean isDirectory()
isDirectory in interface MFilepublic boolean isZipFile()
MFilepublic boolean isReadable()
isReadable in interface MFilepublic java.lang.String getPath()
MFilepublic java.lang.String getName()
MFilepublic int compareTo(MFile o)
public java.lang.Object getAuxInfo()
getAuxInfo in interface MFilepublic void setAuxInfo(java.lang.Object info)
setAuxInfo in interface MFilepublic boolean exists()
MFilepublic java.io.InputStream getInputStream()
MFilegetInputStream in interface MFilepublic void writeToStream(java.io.OutputStream outputStream)
throws java.io.IOException
MFilewriteToStream in interface MFileoutputStream - the OutputStream the MFile contents should be written tojava.io.IOExceptionpublic void writeToStream(java.io.OutputStream outputStream,
long offset,
long maxBytes)
throws java.io.IOException
MFilewriteToStream in interface MFileoutputStream - the OutputStream the MFile contents should be written tooffset - the index of the first byte to write outmaxBytes - the maximum number of bytes to copyjava.io.IOExceptionpublic MFileZip getChild(java.lang.String newFilename)
MFilepublic java.lang.String relativize(MFile other)
MFilerelativize in interface MFileother - the MFile to relativize against this MFile's pathpublic java.nio.file.Path getRootPath()
public java.nio.file.Path getRelativePath()
public java.util.List<java.util.zip.ZipEntry> getLeafEntries()