// Stub class generated by rmic, do not edit. // Contents subject to change without notice. package com.healthmarketscience.rmiio; import java.io.IOException; import java.io.Serializable; import java.rmi.Remote; import java.rmi.RemoteException; import java.rmi.UnexpectedException; import javax.rmi.CORBA.Stub; import javax.rmi.CORBA.Util; import org.omg.CORBA.ORB; import org.omg.CORBA.SystemException; import org.omg.CORBA.portable.ApplicationException; import org.omg.CORBA.portable.InputStream; import org.omg.CORBA.portable.OutputStream; import org.omg.CORBA.portable.RemarshalException; import org.omg.CORBA.portable.ResponseHandler; import org.omg.CORBA.portable.ServantObject; public class _RemoteInputStream_Stub extends Stub implements RemoteInputStream { private static final String[] _type_ids = { "RMI:com.healthmarketscience.rmiio.RemoteInputStream:0000000000000000" }; public String[] _ids() { return _type_ids; } public boolean usingGZIPCompression() throws java.io.IOException, java.rmi.RemoteException { if (!Util.isLocal(this)) { try { org.omg.CORBA_2_3.portable.InputStream in = null; try { OutputStream out = _request("usingGZIPCompression", true); in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out); return in.read_boolean(); } catch (ApplicationException ex) { in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream(); String $_id = in.read_string(); if ($_id.equals("IDL:java/io/IOEx:1.0")) { throw (java.io.IOException) in.read_value(java.io.IOException.class); } throw new UnexpectedException($_id); } catch (RemarshalException ex) { return usingGZIPCompression(); } finally { _releaseReply(in); } } catch (SystemException ex) { throw Util.mapSystemException(ex); } } else { ServantObject so = _servant_preinvoke("usingGZIPCompression",RemoteInputStream.class); if (so == null) { return usingGZIPCompression(); } try { return ((RemoteInputStream)so.servant).usingGZIPCompression(); } catch (Throwable ex) { Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); if (exCopy instanceof java.io.IOException) { throw (java.io.IOException)exCopy; } throw Util.wrapException(exCopy); } finally { _servant_postinvoke(so); } } } public int available() throws java.io.IOException, java.rmi.RemoteException { if (!Util.isLocal(this)) { try { org.omg.CORBA_2_3.portable.InputStream in = null; try { OutputStream out = _request("available", true); in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out); return in.read_long(); } catch (ApplicationException ex) { in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream(); String $_id = in.read_string(); if ($_id.equals("IDL:java/io/IOEx:1.0")) { throw (java.io.IOException) in.read_value(java.io.IOException.class); } throw new UnexpectedException($_id); } catch (RemarshalException ex) { return available(); } finally { _releaseReply(in); } } catch (SystemException ex) { throw Util.mapSystemException(ex); } } else { ServantObject so = _servant_preinvoke("available",RemoteInputStream.class); if (so == null) { return available(); } try { return ((RemoteInputStream)so.servant).available(); } catch (Throwable ex) { Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); if (exCopy instanceof java.io.IOException) { throw (java.io.IOException)exCopy; } throw Util.wrapException(exCopy); } finally { _servant_postinvoke(so); } } } public void close(boolean arg0) throws java.io.IOException, java.rmi.RemoteException { if (!Util.isLocal(this)) { try { org.omg.CORBA_2_3.portable.InputStream in = null; try { OutputStream out = _request("close", true); out.write_boolean(arg0); _invoke(out); } catch (ApplicationException ex) { in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream(); String $_id = in.read_string(); if ($_id.equals("IDL:java/io/IOEx:1.0")) { throw (java.io.IOException) in.read_value(java.io.IOException.class); } throw new UnexpectedException($_id); } catch (RemarshalException ex) { close(arg0); } finally { _releaseReply(in); } } catch (SystemException ex) { throw Util.mapSystemException(ex); } } else { ServantObject so = _servant_preinvoke("close",RemoteInputStream.class); if (so == null) { close(arg0); return ; } try { ((RemoteInputStream)so.servant).close(arg0); } catch (Throwable ex) { Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); if (exCopy instanceof java.io.IOException) { throw (java.io.IOException)exCopy; } throw Util.wrapException(exCopy); } finally { _servant_postinvoke(so); } } } public byte[] readPacket(int arg0) throws java.io.IOException, java.rmi.RemoteException { if (!Util.isLocal(this)) { try { org.omg.CORBA_2_3.portable.InputStream in = null; try { OutputStream out = _request("readPacket", true); out.write_long(arg0); in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out); return (byte[]) in.read_value(byte[].class); } catch (ApplicationException ex) { in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream(); String $_id = in.read_string(); if ($_id.equals("IDL:java/io/IOEx:1.0")) { throw (java.io.IOException) in.read_value(java.io.IOException.class); } throw new UnexpectedException($_id); } catch (RemarshalException ex) { return readPacket(arg0); } finally { _releaseReply(in); } } catch (SystemException ex) { throw Util.mapSystemException(ex); } } else { ServantObject so = _servant_preinvoke("readPacket",RemoteInputStream.class); if (so == null) { return readPacket(arg0); } try { byte[] result = ((RemoteInputStream)so.servant).readPacket(arg0); return (byte[])Util.copyObject(result,_orb()); } catch (Throwable ex) { Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); if (exCopy instanceof java.io.IOException) { throw (java.io.IOException)exCopy; } throw Util.wrapException(exCopy); } finally { _servant_postinvoke(so); } } } public long skip(long arg0, int arg1) throws java.io.IOException, java.rmi.RemoteException { if (!Util.isLocal(this)) { try { org.omg.CORBA_2_3.portable.InputStream in = null; try { OutputStream out = _request("skip", true); out.write_longlong(arg0); out.write_long(arg1); in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out); return in.read_longlong(); } catch (ApplicationException ex) { in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream(); String $_id = in.read_string(); if ($_id.equals("IDL:java/io/IOEx:1.0")) { throw (java.io.IOException) in.read_value(java.io.IOException.class); } throw new UnexpectedException($_id); } catch (RemarshalException ex) { return skip(arg0,arg1); } finally { _releaseReply(in); } } catch (SystemException ex) { throw Util.mapSystemException(ex); } } else { ServantObject so = _servant_preinvoke("skip",RemoteInputStream.class); if (so == null) { return skip(arg0, arg1); } try { return ((RemoteInputStream)so.servant).skip(arg0, arg1); } catch (Throwable ex) { Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); if (exCopy instanceof java.io.IOException) { throw (java.io.IOException)exCopy; } throw Util.wrapException(exCopy); } finally { _servant_postinvoke(so); } } } }