Ejemplo n.º 1
0
 public static org.omg.CORBA.TypeCode type() {
   if (_type == null) {
     _type =
         org.omg
             .CORBA
             .ORB
             .init()
             .create_struct_tc(
                 erabilgarriak.FileDataHelper.id(),
                 "FileData",
                 new org.omg.CORBA.StructMember[] {
                   new org.omg.CORBA.StructMember(
                       "name", org.omg.CORBA.ORB.init().create_string_tc(0), null),
                   new org.omg.CORBA.StructMember(
                       "size",
                       org.omg
                           .CORBA
                           .ORB
                           .init()
                           .get_primitive_tc(org.omg.CORBA.TCKind.from_int(23)),
                       null),
                   new org.omg.CORBA.StructMember(
                       "hash", org.omg.CORBA.ORB.init().create_string_tc(0), null)
                 });
   }
   return _type;
 }
Ejemplo n.º 2
0
  public static void write(
      final org.omg.CORBA.portable.OutputStream _out, erabilgarriak.FileData[] _s) {

    _out.write_long(_s.length);
    for (int i = 0; i < _s.length; i++) {
      erabilgarriak.FileDataHelper.write(_out, _s[i]);
    }
  }
Ejemplo n.º 3
0
 public static org.omg.CORBA.TypeCode type() {
   if (_type == null) {
     _type =
         org.omg
             .CORBA
             .ORB
             .init()
             .create_alias_tc(
                 erabilgarriak.ServerPackage.FileDataArrayHelper.id(),
                 "FileDataArray",
                 org.omg
                     .CORBA
                     .ORB
                     .init()
                     .create_sequence_tc(0, erabilgarriak.FileDataHelper.type()));
   }
   return _type;
 }
Ejemplo n.º 4
0
  public static erabilgarriak.FileData[] read(final org.omg.CORBA.portable.InputStream _in) {
    erabilgarriak.FileData[] _result;
    int _l_result1 = _in.read_long();
    try {
      int x = _in.available();
      if (x > 0 && _l_result1 > x) {
        throw new org.omg.CORBA.MARSHAL(
            "Sequence length too large. Only "
                + x
                + " available and trying to assign "
                + _l_result1);
      }
    } catch (java.io.IOException e) {
    }
    _result = new erabilgarriak.FileData[_l_result1];
    for (int i = 0; i < _result.length; i++) {
      _result[i] = erabilgarriak.FileDataHelper.read(_in);
    }

    return _result;
  }
Ejemplo n.º 5
0
 public org.omg.CORBA.portable.OutputStream _invoke(
     String method,
     org.omg.CORBA.portable.InputStream _input,
     org.omg.CORBA.portable.ResponseHandler handler)
     throws org.omg.CORBA.SystemException {
   org.omg.CORBA.portable.OutputStream _out = null;
   // do something
   // quick lookup of operation
   java.lang.Integer opsIndex = (java.lang.Integer) m_opsHash.get(method);
   if (null == opsIndex) throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
   switch (opsIndex.intValue()) {
     case 0: // getFileData
       {
         _out = handler.createReply();
         erabilgarriak.FileDataHelper.write(_out, getFileData());
         break;
       }
     case 1: // getPart
       {
         int _arg0 = _input.read_long();
         erabilgarriak.DownloadFilePackage.PartHolder _arg1 =
             new erabilgarriak.DownloadFilePackage.PartHolder();
         _arg1._read(_input);
         _out = handler.createReply();
         _out.write_long(getPart(_arg0, _arg1));
         erabilgarriak.DownloadFilePackage.PartHelper.write(_out, _arg1.value);
         break;
       }
     case 2: // getPartCount
       {
         _out = handler.createReply();
         _out.write_long(getPartCount());
         break;
       }
   }
   return _out;
 }