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.
public CabDecoder(InputStream new_input,
CabDecoderInterface new_decoder_interface) throws CabException,
IOException;
Opens a cabinet for decoding.
Parameter | Description |
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.
public Enumeration entries();
Enumerates the files that are contained in the cabinet.
Return Value:
Returns an enumeration of CabFileEntry objects for this cabinet.
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.
Parameter | Description |
full
| Set true to enumerate all entries; set to false to enumerate just the CabFileEntry objects.
|
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.