package speiger.src.coreengine.assets.base;

import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.List;

import com.google.gson.JsonObject;

import speiger.src.coreengine.assets.AssetLocation;

public interface IAsset extends Closeable
{
	public IAssetPackage owner();
	public AssetLocation location();
	@Override
	public void close();
	public IAsset subAsset(String alternative);
	public InputStream stream() throws IOException;
	public ByteBuffer bytes() throws IOException;
	public BufferedReader reader() throws IOException;
	public List<String> lines() throws IOException;
	public JsonObject json() throws IOException;
	public BufferedImage texture() throws Exception;
	public <T> T custom(IAssetParser<T> parser) throws IOException;
}
