_PsToPdfServiceStub.java 5.83 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.ps2pdf;

import com.adobe.ps2pdf.*;
import org.omg.CORBA.UNKNOWN;
import org.omg.CORBA.portable.*;

public class _PsToPdfServiceStub
extends ObjectImpl
implements PsToPdfService {
    private String[] ids = new String[]{"IDL:com/adobe/ps2pdf/PsToPdfService:1.0"};
    public static final Class _opsClass = PsToPdfServiceOperations.class;

    public String[] _ids() {
        return this.ids;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Loose catch block
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     * Lifted jumps to return sites
     */
    public void convertToPdf(PsToPdfFilePaths filePaths, PsToPdfFontPaths fontPaths, boolean bUsePrologue, long timeout) throws PsToPdfFailureException {
        while (!this._is_local()) {
            InputStream _is = null;
            try {
                OutputStream _os = this._request("convertToPdf", true);
                PsToPdfFilePathsHelper.write(_os, filePaths);
                PsToPdfFontPathsHelper.write(_os, fontPaths);
                _os.write_boolean(bUsePrologue);
                _os.write_longlong(timeout);
                _is = this._invoke(_os);
                return;
            }
            catch (RemarshalException _rx) {}
            continue;
            catch (ApplicationException _ax) {
                String _id = _ax.getId();
                if (!_id.equals("IDL:com/adobe/ps2pdf/PsToPdfFailureException:1.0")) throw new RuntimeException("Unexpected exception " + _id);
                throw PsToPdfFailureExceptionHelper.read(_ax.getInputStream());
            }
            finally {
                this._releaseReply(_is);
                continue;
            }
        }
        ServantObject _so = this._servant_preinvoke("convertToPdf", _opsClass);
        if (_so == null) {
            throw new UNKNOWN("local invocations not supported!");
        }
        PsToPdfServiceOperations _localServant = (PsToPdfServiceOperations)_so.servant;
        try {
            _localServant.convertToPdf(filePaths, fontPaths, bUsePrologue, timeout);
            return;
        }
        finally {
            this._servant_postinvoke(_so);
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Loose catch block
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     * Lifted jumps to return sites
     */
    public FontsInFolder[] getFontsInFolder(PsToPdfFontPaths fontPaths, String folderPath) throws PsToPdfFailureException {
        while (!this._is_local()) {
            InputStream _is = null;
            try {
                FontsInFolder[] _result2;
                OutputStream _os = this._request("getFontsInFolder", true);
                PsToPdfFontPathsHelper.write(_os, fontPaths);
                _os.write_wstring(folderPath);
                _is = this._invoke(_os);
                FontsInFolder[] arrfontsInFolder = _result2 = AvailableFontsHelper.read(_is);
                return arrfontsInFolder;
            }
            catch (RemarshalException _rx) {}
            continue;
            catch (ApplicationException _ax) {
                String _id = _ax.getId();
                if (!_id.equals("IDL:com/adobe/ps2pdf/PsToPdfFailureException:1.0")) throw new RuntimeException("Unexpected exception " + _id);
                throw PsToPdfFailureExceptionHelper.read(_ax.getInputStream());
            }
            finally {
                this._releaseReply(_is);
                continue;
            }
        }
        ServantObject _so = this._servant_preinvoke("getFontsInFolder", _opsClass);
        if (_so == null) {
            throw new UNKNOWN("local invocations not supported!");
        }
        PsToPdfServiceOperations _localServant = (PsToPdfServiceOperations)_so.servant;
        try {
            FontsInFolder[] _result = _localServant.getFontsInFolder(fontPaths, folderPath);
            return _result;
        }
        finally {
            this._servant_postinvoke(_so);
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Loose catch block
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     * Lifted jumps to return sites
     */
    public String getColorProfilesDirectory() throws PsToPdfFailureException {
        while (!this._is_local()) {
            InputStream _is = null;
            try {
                String _result2;
                OutputStream _os = this._request("getColorProfilesDirectory", true);
                _is = this._invoke(_os);
                String string = _result2 = _is.read_wstring();
                return string;
            }
            catch (RemarshalException _rx) {}
            continue;
            catch (ApplicationException _ax) {
                String _id = _ax.getId();
                if (!_id.equals("IDL:com/adobe/ps2pdf/PsToPdfFailureException:1.0")) throw new RuntimeException("Unexpected exception " + _id);
                throw PsToPdfFailureExceptionHelper.read(_ax.getInputStream());
            }
            finally {
                this._releaseReply(_is);
                continue;
            }
        }
        ServantObject _so = this._servant_preinvoke("getColorProfilesDirectory", _opsClass);
        if (_so == null) {
            throw new UNKNOWN("local invocations not supported!");
        }
        PsToPdfServiceOperations _localServant = (PsToPdfServiceOperations)_so.servant;
        try {
            String _result = _localServant.getColorProfilesDirectory();
            return _result;
        }
        finally {
            this._servant_postinvoke(_so);
        }
    }
}