CkRar Java Programming
Reference Documentation

CkRar

Properties

// 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_NumEntries( )

The number of files and directories in the RAR archive.

// Returns a boolean value
get_Utf8( )

// b is a boolean (input)
put_Utf8( b )

To be documented soon...

Methods

// Returns a boolean value
Close( )

Closes a RAR archive.

Returns true for success, false for failure.

// filename is a string (input)
// Returns a boolean value
FastOpen( filename )

Opens a RAR archive. The filename may include an absolute or relative directory path. This method does not iterate over the entries in the RAR archive. The NumEntries property will remain at 0 after FastOpen is called. FastOpen is provided as a quicker means to open a RAR archive if the intended usage is to simply call Unrar to extract the files and directories.

Returns true for success, false for failure.

// index is an integer (input)
GetEntryByIndex( index )

Returns a RarEntry object for the Nth entry in the RAR archive. The archive must have first been opened by calling Open (not FastOpen). Returns null if the index is out of range. The 1st entry is at index 0.

// filename is a string (input)
GetEntryByName( filename )

Returns a RarEntry object by filename. The RAR archive must have first been opened by calling Open (not FastOpen). Returns null if the entry was not found.

// filename is a string (input)
// Returns a boolean value
Open( filename )

Opens a RAR archive. The filename may include an absolute or relative directory path. This method iterates over the files and directories. Upon returning, the NumEntries property contains the number of files/directories in the RAR, and GetEntryByIndex may be called to retrieve information about each file/directory.

Returns true for success, false for failure.

// filename is a string (input)
// Returns a boolean value
SaveLastError( filename )

Saves the last error information to an XML formatted file.

// dirPath is a string (input)
// Returns a boolean value
Unrar( dirPath )

Extracts the files and directories from a RAR archive. The directory tree contained within the RAR is re-created with it's root at dirPath.

Returns true for success, false for failure.

// Returns a string
lastErrorHtml( )

Error information in HTML format for the last method called.

// Returns a string
lastErrorText( )

Error information in plain-text format for the last method called.

// Returns a string
lastErrorXml( )

Error information in XML format for the last method called.