Commit 61e6dfc0 authored by Stephanie Gawroriski's avatar Stephanie Gawroriski
Browse files

Remove SoftJar, it is not currently a good idea.

parent 7a88e6f0
// ---------------------------------------------------------------------------
// SquirrelJME
// Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------
package cc.squirreljme.jvm.mle.brackets;
import java.io.Closeable;
/**
* An input stream for reading resources within {@link SoftJarWrapper}.
*
* @since 2022/02/27
*/
public interface SoftJarResourceInputStream
extends Closeable
{
/** End of file reached. */
int EOF =
-1;
/** I/O Exception. */
int IO_EXCEPTION =
-2;
/**
* Reads the given number of bytes from the input stream.
*
* @param __b The number of bytes to read.
* @param __o The offset into the buffer.
* @param __l The number of bytes to read.
* @return The number of bytes read or a special code for specific
* circumstances.
* @since 2022/02/27
*/
int read(byte[] __b, int __o, int __l);
}
// ---------------------------------------------------------------------------
// SquirrelJME
// Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------
package cc.squirreljme.jvm.mle.brackets;
/**
* This is a wrapper for software enabled JARs.
*
* @since 2022/02/27
*/
public interface SoftJarWrapper
{
/**
* Opens the specifies resource within the JAR.
*
* @param __rc The resource to open.
* @return The opened resource or {@code null} if it does not exist.
* @since 2022/202/27
*/
SoftJarResourceInputStream openResource(String __rc);
}
// ---------------------------------------------------------------------------
// SquirrelJME
// Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------
package cc.squirreljme.jvm.softjar;
import cc.squirreljme.jvm.mle.brackets.SoftJarResourceInputStream;
import cc.squirreljme.jvm.mle.brackets.SoftJarWrapper;
import cc.squirreljme.runtime.cldc.debug.Debugging;
/**
* This class represents an instance of a {@code .kjx} file.
*
* The KJX format is simple and is in the following structure:
* - {@code uint8_t[3] magic}: Magic number.
* - {@code uint8_t jadStartPos}: Start position of the {@code .jad} file.
* - {@code uint8_t fileNameLen}: The length of the current KJX file name.
* - {@code uint8_t[fileNameLen] fileName}: The name of the current KJX file.
* - {@code uint16_t jadLen}: The length of the embedded JAD file.
* - {@code uint8_t jadNameLen}: The length of the JAD filename.
* - {@code uint8_t[jadNameLen] jadName}: The name of the JAD file.
* - {@code uint8_t[jadLen] jadContent}: The JAD contents.
* - {@code uint8_t[...rest...] jarData}: Remainder is the JAR data.
*
* @since 2022/02/27
*/
public class KjxSoftJar
implements SoftJarWrapper
{
/**
* {@inheritDoc}
* @since 2022/02/27
*/
@Override
public SoftJarResourceInputStream openResource(String __rc)
{
throw Debugging.todo();
}
}
// ---------------------------------------------------------------------------
// SquirrelJME
// Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------
/**
* This package contains the implementation of software backed JAR files and
* otherwise.
*
* @since 2022/02/27
*/
package cc.squirreljme.jvm.softjar;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment