|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provides a general framework for reading a collection of directories and files. Currently only tar format files are supported, but this could be extended to other uses. It would be simple to make a class for reading zip files, since Java already has support for zip files. The source of data does not need to be a single archive file. For example you could write a class which would mirror a directory structure from an FTP site.
Method Summary | |
String |
getEntryName()
Returns the name of the current archive entry. |
InputStream |
getStream()
Returns a stream which will read the current file. |
boolean |
hasNextEntry()
Tests if there are more entries in this archive after the current one. |
boolean |
isDirectory()
Tests If the current entry is a directory. |
boolean |
isFile()
Tests If the current entry is a regular file. |
void |
nextEntry()
Advances to the next entry in the archive. |
Method Detail |
public void nextEntry() throws IOException
getStream()
.
When an archive object is created, it should already be positioned at the
first entry in the archive.
IOException
public boolean hasNextEntry()
public String getEntryName()
public boolean isDirectory()
public boolean isFile()
public InputStream getStream()
nextEntry()
.
This method should only be called once per entry. The behavior of the
streams returned is not specified if this method is called more
than once.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |