More documentation.

This commit is contained in:
Jindra Petřík
2024-08-06 06:17:00 +02:00
parent 68954e714d
commit b57e38e387
286 changed files with 11752 additions and 3576 deletions

View File

@@ -17,28 +17,64 @@
package com.jpexs.decompiler.flash;
import com.jpexs.helpers.streams.SeekableInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.Set;
/**
*
* Bundle interface.
* A bundle is a collection of openable files. (e.g. SWC, ZIP, etc.)
* @author JPEXS
*/
public interface Bundle {
/**
* Gets number of openable files in the bundle.
* @return Number of openable files in the bundle
*/
public int length();
/**
* Gets keys of openable files in the bundle.
* @return Keys of openable files in the bundle
*/
public Set<String> getKeys();
/**
* Gets openable file by key.
* @param key Key
* @return Openable file
* @throws IOException
*/
public SeekableInputStream getOpenable(String key) throws IOException;
/**
* Gets all openable files in the bundle.
* @return Map from key to seekable input stream
* @throws IOException
*/
public Map<String, SeekableInputStream> getAll() throws IOException;
/**
* Gets extension of the bundle. (without dot)
* @return Extension of the bundle
*/
public String getExtension();
/**
* Checks if the bundle is read-only.
* @return True if the bundle is read-only, false otherwise
*/
public boolean isReadOnly();
/**
* Replace openable file by key.
* @param key Key
* @param is New input stream
* @return True if the file was replaced, false otherwise
* @throws IOException
*/
public boolean putOpenable(String key, InputStream is) throws IOException;
}