Search in sources :

Example 1 with CSOInfo

use of com.github.jakz.romlib.support.cso.CSOInfo in project rom-manager by Jakz.

the class CSOSupportPlugin method getSpecializedEntry.

@Override
public Handle getSpecializedEntry(Handle entry) {
    try {
        if (entry instanceof BinaryHandle) {
            BinaryHandle handle = (BinaryHandle) entry;
            if (handle.getExtension().compareToIgnoreCase("cso") == 0) {
                CSOInfo info = new CSOInfo(handle.path());
                Log.getLogger(LogSource.SCANNER).i3("Found potential CSO iso: " + handle.path());
                return new CSOBinaryHandle(handle.path(), info);
            }
        }
    } catch (IOException e) {
        e.printStackTrace();
    }
    return entry;
}
Also used : CSOInfo(com.github.jakz.romlib.support.cso.CSOInfo) CSOBinaryHandle(com.github.jakz.romlib.support.cso.CSOBinaryHandle) IOException(java.io.IOException) CSOBinaryHandle(com.github.jakz.romlib.support.cso.CSOBinaryHandle) BinaryHandle(com.pixbits.lib.io.archive.handles.BinaryHandle)

Aggregations

CSOBinaryHandle (com.github.jakz.romlib.support.cso.CSOBinaryHandle)1 CSOInfo (com.github.jakz.romlib.support.cso.CSOInfo)1 BinaryHandle (com.pixbits.lib.io.archive.handles.BinaryHandle)1 IOException (java.io.IOException)1