package utiles;
/**
* Generated from IDL interface "FilePart".
*
* @author JacORB IDL compiler V 2.3.1, 27-May-2009
* @version generated at 25-may-2011 12:07:19
*/
public class _FilePartStub
extends org.omg.CORBA.portable.ObjectImpl
implements utiles.FilePart
{
private String[] ids = {"IDL:utiles/FilePart:1.0"};
public String[] _ids()
{
return ids;
}
public final static java.lang.Class _opsClass = utiles.FilePartOperations.class;
public int getPart(int numPart, utiles.FilePartPackage.partHolder zatia)
{
while(true)
{
if(! this._is_local())
{
org.omg.CORBA.portable.InputStream _is = null;
org.omg.CORBA.portable.OutputStream _os = null;
try
{
_os = _request( "getPart", true);
_os.write_long(numPart);
utiles.FilePartPackage.partHelper.write(_os,zatia.value);
_is = _invoke(_os);
int _result = _is.read_long();
zatia.value = utiles.FilePartPackage.partHelper.read(_is);
return _result;
}
catch( org.omg.CORBA.portable.RemarshalException _rx ){}
catch( org.omg.CORBA.portable.ApplicationException _ax )
{
String _id = _ax.getId();
try
{
_ax.getInputStream().close();
}
catch (java.io.IOException e)
{
throw new RuntimeException("Unexpected exception " + e.toString() );
}
throw new RuntimeException("Unexpected exception " + _id );
}
finally
{
if (_os != null)
{
try
{
_os.close();
}
catch (java.io.IOException e)
{
throw new RuntimeException("Unexpected exception " + e.toString() );
}
}
this._releaseReply(_is);
}
}
else
{
org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "getPart", _opsClass );
if( _so == null )
throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
FilePartOperations _localServant = (FilePartOperations)_so.servant;
int _result;
try
{
_result = _localServant.getPart(numPart,zatia);
}
finally
{
_servant_postinvoke(_so);
}
return _result;
}
}
}
public int getPartCount()
{
while(true)
{
if(! this._is_local())
{
org.omg.CORBA.portable.InputStream _is = null;
org.omg.CORBA.portable.OutputStream _os = null;
try
{
_os = _request( "getPartCount", true);
_is = _invoke(_os);
int _result = _is.read_long();
return _result;
}
catch( org.omg.CORBA.portable.RemarshalException _rx ){}
catch( org.omg.CORBA.portable.ApplicationException _ax )
{
String _id = _ax.getId();
try
{
_ax.getInputStream().close();
}
catch (java.io.IOException e)
{
throw new RuntimeException("Unexpected exception " + e.toString() );
}
throw new RuntimeException("Unexpected exception " + _id );
}
finally
{
if (_os != null)
{
try
{
_os.close();
}
catch (java.io.IOException e)
{
throw new RuntimeException("Unexpected exception " + e.toString() );
}
}
this._releaseReply(_is);
}
}
else
{
org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "getPartCount", _opsClass );
if( _so == null )
throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
FilePartOperations _localServant = (FilePartOperations)_so.servant;
int _result;
try
{
_result = _localServant.getPartCount();
}
finally
{
_servant_postinvoke(_so);
}
return _result;
}
}
}
}