Jameo Core Library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
jm::ZipOutputFile Class Reference

This class represents a ZIP file for writing ZIP data. More...

Inheritance diagram for jm::ZipOutputFile:
jm::Object

Public Member Functions

 ZipOutputFile (File *file)
 Constructor for the ZipOutputFile class.
 
void open ()
 Opens the file for writing.
 
void close ()
 Closes the file and releases any resources associated with it.
 
void closeEntry ()
 Closes the current entry and prepares the file for writing the next entry. This method should be called after writing the data for the current entry is complete.
 
void putNextEntry (ZipEntry *entry)
 Begins writing a new ZIP entry. The stream is now positioned correctly to receive data.
 
void write (uint8 *data, int64 offset, size_t length)
 Writes the specified data to the stream.
 
void writeAndClose (File *file)
 Writes the content of the file to the stream and closes the file.
 
- Public Member Functions inherited from jm::Object
 Object () noexcept
 Constructor.
 
virtual ~Object () noexcept
 Destructor.
 
void release () noexcept
 Decreases the reference counter and releases the object immediately when the reference counter becomes 0.
 
Objectretain () noexcept
 Increases the reference counter of this object by 1.
 
Objectautorelease () noexcept
 Same function as release(), but releases the object with a delay if the reference counter is 0. AutoreleasePool::drain() must be called in the to release the object.
 
int32 referenceCount () const noexcept
 Returns the value of the reference counter.
 
virtual bool equals (const Object *other) const
 Comparison of objects.
 
virtual String displayName () const
 Returns the display name of the object intended to present to a user.
 
virtual void printDiffInfo (DiffOperation operation, Object *other) const
 Output method for outputting the diff results for the diff algorithm.
 
void setHighBit (bool status) noexcept
 
bool highBit () const noexcept
 

Detailed Description

This class represents a ZIP file for writing ZIP data.

Constructor & Destructor Documentation

◆ ZipOutputFile()

jm::ZipOutputFile::ZipOutputFile ( File file)
explicit

Constructor for the ZipOutputFile class.

Parameters
fileA pointer to the File object representing the ZIP file.

Member Function Documentation

◆ close()

void jm::ZipOutputFile::close ( )

Closes the file and releases any resources associated with it.

◆ closeEntry()

void jm::ZipOutputFile::closeEntry ( )

Closes the current entry and prepares the file for writing the next entry. This method should be called after writing the data for the current entry is complete.

◆ open()

void jm::ZipOutputFile::open ( )

Opens the file for writing.

◆ putNextEntry()

void jm::ZipOutputFile::putNextEntry ( ZipEntry entry)

Begins writing a new ZIP entry. The stream is now positioned correctly to receive data.

Parameters
entryThe ZipEntry object representing the new entry to be written.

◆ write()

void jm::ZipOutputFile::write ( uint8 *  data,
int64  offset,
size_t  length 
)

Writes the specified data to the stream.

Parameters
dataA pointer to the data to be written.
offsetThe offset in the data buffer where writing should start.
lengthThe number of bytes to write.

◆ writeAndClose()

void jm::ZipOutputFile::writeAndClose ( File file)

Writes the content of the file to the stream and closes the file.

Parameters
fileA pointer to the File object representing the file to be written.