mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-20 00:47:46 +00:00
More documentation.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user