CkZipEntry Java Programming Reference Documentation
CkZipEntry
Represents a single file or directory entry within a Chilkat Zip object.
Object Creation
CkZipEntry obj = new CkZipEntry();
Properties
// str is a CkString object (output) get_Comment( str )
// pStr is a string (input) put_Comment( pStr )
The comment stored within the Zip for this entry.
// Returns an integer value get_CompressedLength( )
The size in bytes of this entry's file data when compression is applied
// Returns an integer value get_CompressionLevel( )
// newVal is an integer (input) put_CompressionLevel( newVal )
The compression level. 0 = no compression, while 9 = maximum compression. The default is 6.
// Returns an integer value get_CompressionMethod( )
// newVal is an integer (input) put_CompressionMethod( newVal )
Set to 0 for no compression, or 8 for the Deflate algorithm. The Deflate algorithm is the default algorithm of the most popular Zip utility programs, such as WinZip
// Returns an integer value get_EntryID( )
The unique ID assigned by Zip.NET while the object is instantiated in memory.
// Returns an integer value get_EntryType( )
Indicates the origin of the entry. There are three possible values: (0) an entry in an existing Zip file, (1) a file on disk referenced by Zip.NET and to be added to the Zip, and (2) an entry created directly from data in memory.
// sysTime is a SYSTEMTIME object (output) get_FileDateTime( sysTime )
// sysTime is a SYSTEMTIME object (input) put_FileDateTime( sysTime )
The last-modified time of the Zip entry.
// str is a CkString object (output) get_FileName( str )
// pStr is a string (input) put_FileName( pStr )
The file name of the Zip entry.
// Returns a boolean value get_IsDirectory( )
True if the Zip entry is a directory, false if it is a file.
// str is a CkString object (output) LastErrorHtml( str )
Error information in HTML format for the last method called.
// str is a CkString object (output) LastErrorText( str )
Error information in plain-text format for the last method called.
// str is a CkString object (output) LastErrorXml( str )
Error information in XML format for the last method called.
// Returns an integer value get_UncompressedLength( )
The size in bytes of this entry's file data when uncompressed.
Methods
// bdata is a CkByteData object (input) // Returns a boolean value AppendData( bdata )
Appends binary data to the zip entry's file contents.
// sdata is a CkString object (input) // Returns a boolean value AppendStringAnsi( sdata )
Appends a ANSI string to the zip entry's file contents.
// bdata is a CkByteData object (output) // Returns a boolean value Copy( bdata )
Returns the compressed data as a byte array.
// str is a CkString object (output) // Returns a boolean value CopyToBase64( str )
Returns the compressed data as a Base64-encoded string. This data can be re-added to a Zip by calling Zip.AppendBase64. Returns true for success, false for failure.
// str is a CkString object (output) // Returns a boolean value CopyToHex( str )
Returns the compressed data as a hexidecimal encoded string. This data can be re-added to a Zip by calling Zip.AppendHex. Returns true for success, false for failure.
// dirPath is a string (input) // Returns a boolean value Extract( dirPath )
Unzips this entry into the specified base directory. The file is unzipped to the subdirectory according to the relative path stored with the entry in the Zip. Use ExtractInto to unzip into a specific directory regardless of the path information stored in the Zip.
// dirPath is a string (input) // Returns a boolean value ExtractInto( dirPath )
Unzip a file into a specific directory
// bdata is a CkByteData object (output) // Returns a boolean value Inflate( bdata )
Inflate a file within a Zip directly into memory.
// addCR is a boolean (input) // str is a CkString object (output) // Returns a boolean value InflateToString( addCR, str )
Inflate and return the uncompressed data as a string. Line-endings are modified to include or not include carriage-returns based on KeepCR. If KeepCR = False, then bare linefeeds are returned, otherwise CRLFs are returned. Returns true for success, false for failure.
// str is a CkString object (output) // Returns a boolean value InflateToString2( str )
Unzip a file directly into memory as a string, and leave line-endings unmodified. Returns true for success, false for failure.
// Returns a CkZipEntry object NextEntry( )
Return the next entry (file or directory) within the Zip Returns a null reference on failure
// bdata is a CkByteData object (input) // Returns a boolean value ReplaceData( bdata )
Replaces the zip entry's existing contents with new data.
// sdata is a CkString object (input) // Returns a boolean value ReplaceStringAnsi( sdata )
Replaces the zip entry's text content with a new ANSI string.
// filename is a string (input) // Returns a boolean value SaveLastError( filename )
Saves the last error information to an XML formatted file.
// Returns a string comment( )
The comment stored within the Zip for this entry. Returns a null on failure
// Returns a string copyToBase64( )
Returns the compressed data as a Base64-encoded string. This data can be re-added to a Zip by calling Zip.AppendBase64. Returns a null on failure
// Returns a string copyToHex( )
Returns the compressed data as a hexidecimal encoded string. This data can be re-added to a Zip by calling Zip.AppendHex. Returns a null on failure
// Returns a string fileName( )
The file name of the Zip entry. Returns a null on failure
// addCR is a boolean (input) // Returns a string inflateToString( addCR )
Inflate and return the uncompressed data as a string. Line-endings are modified to include or not include carriage-returns based on KeepCR. If KeepCR = False, then bare linefeeds are returned, otherwise CRLFs are returned. Returns a null on failure
// Returns a string inflateToString2( )
Unzip a file directly into memory as a string, and leave line-endings unmodified. Returns a null on failure
// Returns a string lastErrorHtml( )
Error information in HTML format for the last method called.Returns a null on failure
// Returns a string lastErrorText( )
Error information in plain-text format for the last method called.Returns a null on failure
// Returns a string lastErrorXml( )
Error information in XML format for the last method called.Returns a null on failure
|