Package com.ms.util.cab Previous
Previous
Contents
Contents
Index
Index
Next
Next

Class CabDecoder

Constructors , Methods

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, see CabDecoderInterface and CabFileEntry.


Constructors


CabDecoder

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

Opens a cabinet for decoding.

ParameterDescription
cab_decoder_interface The interface for extracting files.
new_input The input stream corresponding to the cabinet.

Exceptions:

CabException The cabinet or its compressed data is corrupt.

IOException 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, CabFileEntry objects, and future types of objects.

Return Value:

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


extract

public void extract() throws CabException, IOException;

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

Exceptions:

CabException The cabinet or its compressed data is corrupt.

IOException An I/O error has occurred.



Top© 1997 Microsoft Corporation. All rights reserved. Legal Notices.