Packages
 In this topic

*Constructors

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.util.cab   Previous This
Package
Next

 


Class CabDecoder

public final class CabDecoder
{
  // Constructors
  public CabDecoder(InputStream new_input,
        CabDecoderInterface new_decoder_interface)
        throws CabException, IOException;

  // Methods
  public Enumeration entries();
  public Enumeration entries(boolean full);
  public void extract() throws CabException, IOException;
}

This class is used to decode a cabinet.

For more information about cabinet decoding, see CabDecoderInterface and CabFileEntry.

Constructors

CabDecoder

public CabDecoder(InputStream new_input,
        CabDecoderInterface new_decoder_interface) throws CabException,
        IOException;

Opens a cabinet for decoding.

ParameterDescription
new_decoder_interface The interface used to extract files.
new_input The input stream corresponding to the cabinet.

Exceptions:

com.ms.util.cab.CabException if the cabinet or its compressed data is corrupt.

IOException if an I/O error has occurred.

Methods

entries

public Enumeration entries();

Enumerates the files that are contained in the cabinet.

Return Value:

Returns an enumeration of CabFileEntry objects for this cabinet.

entries

public Enumeration entries(boolean full);

Enumerates the complete contents of the cabinet, including CabFolderEntry objects and CabFileEntry objects.

Return Value:

Returns an enumeration of objects in this cabinet. CabFolderEntry objects are returned at the beginning of each new folder. CabFileEntry objects are returned for each file.

ParameterDescription
full Set true to enumerate all entries; set to false to enumerate just the CabFileEntry objects.

extract

public void extract() throws CabException, IOException;

Extracts files from the cabinet object. The openOutputStream method of the supplied CabDecoderInterface is called for each file stored in the cabinet.

Return Value:

No return value.

Exceptions:

com.ms.util.cab.CabException if the cabinet or its compressed data is corrupt.

IOException if an I/O error occurred.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.