oracle.ide.net
Class JarIndex
java.lang.Object
|
+--oracle.ide.net.JarIndex
- public final class JarIndex
- extends java.lang.Object
This is a data structure used to cache entry names that are read
from a jar/zip table of contents.
Method Summary |
boolean |
dirEntryExists(java.lang.String entryName)
|
boolean |
entryExists(java.lang.String entryName)
|
byte[] |
getBytes(java.lang.String entryName)
Returns a byte array with the uncompressed data corresponding to
entryName . |
JarIndexEntry |
getEntryAt(int i)
|
int |
getNumEntries()
Returns the number of entries in the index. |
int |
getSize(java.lang.String entryName)
Returns the uncompressed size of the specified entry. |
long |
getTimestamp()
|
java.lang.String[] |
list(java.lang.String dirEntryName)
|
java.io.InputStream |
openInputStream(java.lang.String entryName)
Opens an input stream for the specified entryName . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dirEntryExists
public boolean dirEntryExists(java.lang.String entryName)
entryExists
public boolean entryExists(java.lang.String entryName)
getNumEntries
public int getNumEntries()
- Returns the number of entries in the index.
getEntryAt
public JarIndexEntry getEntryAt(int i)
- Throws:
java.lang.IndexOutOfBoundsException
- if the specified index is
less than 0 or greater than or equal to the number of indexed
entries.
getSize
public int getSize(java.lang.String entryName)
- Returns the uncompressed size of the specified entry. If the
entry does not exist, -1 is returned.
list
public java.lang.String[] list(java.lang.String dirEntryName)
openInputStream
public java.io.InputStream openInputStream(java.lang.String entryName)
throws java.io.IOException
- Opens an input stream for the specified
entryName
.
The input stream will contain uncompressed data.
getBytes
public byte[] getBytes(java.lang.String entryName)
throws java.io.IOException
- Returns a byte array with the uncompressed data corresponding to
entryName
.
getTimestamp
public long getTimestamp()