Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sourceforge.pmd
Class ZipDataSource

    java.lang.Object
      net.sourceforge.pmd.ZipDataSource

All Implemented Interfaces:
  DataSource

public class ZipDataSource
extends java.lang.Object
implements DataSource

DataSource implementation to read data from an entry in a zip or jar file.

Constructor Summary
`ZipDataSource(java.util.zip.ZipFile zipFile, java.util.zip.ZipEntry zipEntry)`

Method Summary
`java.io.InputStream` | `getInputStream()` Get an InputStream on the source file.
`java.lang.String` | `getNiceFileName(boolean shortNames, java.lang.String inputFileName)` Return a nice version of the filename.

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

Constructor Detail

### ZipDataSource

    public ZipDataSource(java.util.zip.ZipFile zipFile,
                         java.util.zip.ZipEntry zipEntry)

Parameters:
  `zipFile` - the ZipFile
  `zipEntry` - the ZipEntry containing the file to read

Method Detail

### getInputStream

    public java.io.InputStream getInputStream()
                                       throws java.io.IOException

  Description copied from interface: `DataSource`
  Get an InputStream on the source file.

  Specified by:
    `getInputStream` in interface `DataSource`
  Returns:
    the InputStream reading the source file
  Throws:
    `java.io.IOException` - if the file can't be opened

### getNiceFileName

    public java.lang.String getNiceFileName(boolean shortNames,
                                            java.lang.String inputFileName)

  Description copied from interface: `DataSource`
  Return a nice version of the filename.

  Specified by:
    `getNiceFileName` in interface `DataSource`
  Parameters:
    `shortNames` - true if short names are being used
    `inputFileName` - name of a "master" file this file is relative to

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2006 InfoEther. All Rights Reserved.