Package com.ms.util.cab |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public final class CabCreator { // Constructors public CabCreator(CabProgressInterface new_progress_interface); // Methods public void create(OutputStream output_stream) throws IOException; public void setSetID(int new_set_id); public void abort() throws IOException; public void complete() throws CabException, IOException; public void addStream(InputStream input, CabFileEntry cffile) throws CabException, IOException; public void newFolder(CabFolderEntry folder_info) throws CabException, IOException; }
This is the cabinet creating class.
For more information, see also CabFileEntry, CabConstants, and CabProgressInterface.
public CabCreator(CabProgressInterface new_progress_interface);Initializes CabCreator.
Parameter Description new_cab_creator_interface An interface through which progress reports are made.
public void abort() throws IOException;Aborts cabinet creation. If this method is called, it must be called after the create method and before the complete method. This method will close the output_cabinet stream. After this method has been called, this CabCreator object can still be used to create cabinets.
Exceptions:
IOException An I/O error occurred.
public void addStream(InputStream input, CabFileEntry cffile) throws CabException, IOException;Adds a stream to the cabinet.
Parameter Description input The input stream corresponding to the file to add. cffile A cabinet file entry with at least the name and date entries filled out. Exceptions:
CabException An error occurred (such as attempting to add a stream without first having started a folder).
IOException An I/O error occurred.
public void complete() throws CabException, IOException;Completes cabinet creation.
Exceptions:
CabException An error occurred (such as attempting to create an empty cabinet).
IOException An I/O error occurred.
public void create(OutputStream output_stream) throws IOException;Begins the creation of a new cabinet. Only one cabinet can be created at a time using the same CabCreator object. However, the same CabCreator object may be used multiple times in sequence.
Parameter Description output_stream The output stream for the completed cabinet. Exceptions:
IOException An I/O error occurred.
public void newFolder(CabFolderEntry folder_info) throws CabException, IOException;Begins a new folder.
Parameter Description folder_info An initialized cabinet folder entry indicating the type of compression to use for this folder. Exceptions:
CabException An error occurred (such as unknown compression type).
IOException An I/O error occurred.
public void setSetID(int new_set_id);Sets the Set ID of the cabinet being created. This method must be called after the create method and before the complete method. If this method is not called, the default Set ID is zero.
Parameter Description new_set_id The Set ID for this cabinet (in the range 0...65535).
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.