Extension SDK 10.1.2

oracle.ide.net
Class JarIndex

java.lang.Object
  extended byoracle.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
 int dirEntryIndex(java.lang.String entryName)
           
 int entryIndex(java.lang.String entryName)
           
 byte[] getBytes(java.lang.String entryName)
          Returns a byte array with the uncompressed data corresponding to entryName.
 java.lang.String[] getEntries()
          Fetch a list of all entry names.
 JarIndexEntry getEntryAt(int i)
           
 java.lang.String getEntryNameAt(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()
           
 long getTimestamp(int index)
           
 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
 

Method Detail

dirEntryIndex

public int dirEntryIndex(java.lang.String entryName)

entryIndex

public int entryIndex(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.

getEntryNameAt

public java.lang.String getEntryNameAt(int i)

getEntries

public java.lang.String[] getEntries()
Fetch a list of all entry names.

Returns:
an array of all entry names.

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.

Throws:
java.io.IOException

getBytes

public byte[] getBytes(java.lang.String entryName)
                throws java.io.IOException
Returns a byte array with the uncompressed data corresponding to entryName.

Throws:
java.io.IOException

getTimestamp

public long getTimestamp(int index)

getTimestamp

public long getTimestamp()

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.