Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vistech.util
Class JarUtil

    java.lang.Object
      |
      +--com.vistech.util.JarUtil

public class JarUtil
extends java.lang.Object

Field Summary
`static int` | `BY_ALPHA`
`static int` | `BY_DATE`

Constructor Summary
`JarUtil()`

Method Summary
`static boolean` | `filterFileNames(java.lang.String name, java.lang.String[] filter)` Filters file names.
`static boolean` | `isImage(java.lang.String fl)`
`static java.lang.String[]` | `listJarEntries(java.io.File jarfile, java.lang.String[] filter)` Filters the file names in a jar and lists them.
`static java.lang.String[]` | `listJarEntries(java.util.jar.JarFile jarfile, java.lang.String[] filter)` Lists the files in a jar.
`static java.lang.String[]` | `listJarEntries(java.util.jar.JarFile jarfile, java.lang.String[] filter, int sortMode)`
`static java.lang.String[]` | `listJarFiles(java.io.File jarfile, java.lang.String[] filter)` Filters the file names in a jar and lists them.
`static java.lang.String[]` | `listJarFiles(java.io.File file, java.lang.String[] filter, int sortMode)`
`static java.lang.String[]` | `listJarFiles(java.lang.String jarpath, java.lang.String[] filter)` Filters the file names in a jar and lists them.
`static java.lang.String[]` | `listZipEntries(java.util.zip.ZipFile zipfile, java.lang.String[] filter)` Lists the files in a zip file.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BY_DATE

    public static final int BY_DATE

### BY_ALPHA

    public static final int BY_ALPHA

Constructor Detail

### JarUtil

    public JarUtil()

Method Detail

### listJarFiles

    public static java.lang.String[] listJarFiles(java.lang.String jarpath,
                                                  java.lang.String[] filter)

  Filters the file names in a jar and lists them.
  Parameters:
    `jarpath` - the complete path name of the jar file including the file name.
    `filter` - an array of file name extensions.
  Returns:
    an array of file names.

### listJarFiles

    public static java.lang.String[] listJarFiles(java.io.File file,
                                                  java.lang.String[] filter,
                                                  int sortMode)

### listJarEntries

    public static java.lang.String[] listJarEntries(java.util.jar.JarFile jarfile,
                                                    java.lang.String[] filter)

  Lists the files in a jar.
  Parameters:
    `jarfile` - the jar file.
    `filter` - an array of file name extensions.
  Returns:
    an array of file names.

### listJarEntries

    public static java.lang.String[] listJarEntries(java.util.jar.JarFile jarfile,
                                                    java.lang.String[] filter,
                                                    int sortMode)

### listZipEntries

    public static java.lang.String[] listZipEntries(java.util.zip.ZipFile zipfile,
                                                    java.lang.String[] filter)

  Lists the files in a zip file.
  Parameters:
    `jarfile` - the jar file.
    `filter` - an array of file name extensions.
  Returns:
    an array of file names.

### listJarFiles

    public static java.lang.String[] listJarFiles(java.io.File jarfile,
                                                  java.lang.String[] filter)

  Filters the file names in a jar and lists them.
  Parameters:
    `jarfile` - the jar file.
    `filter` - an array of file name extensions.
  Returns:
    an array of file names.

### listJarEntries

    public static java.lang.String[] listJarEntries(java.io.File jarfile,
                                                    java.lang.String[] filter)

  Filters the file names in a jar and lists them.
  Parameters:
    `jarfile` - the jar file.
    `filter` - an array of file name extensions.
  Returns:
    an array of file names.

### filterFileNames

    public static boolean filterFileNames(java.lang.String name,
                                          java.lang.String[] filter)

  Filters file names.
  Parameters:
    `name` - the file name.
    `filter` - an array of file name extensions

### isImage

    public static boolean isImage(java.lang.String fl)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD