Пример #1
0
 public static ErlType complexAnalyse(ByteBuffer data)
 {
     int position = data.position;
     int num2 = data.readByte();
     data.position = position;
     if ((num2 == ErlArray.TAG[0]) || (num2 == ErlArray.TAG[1]))
     {
         ErlArray array = new ErlArray(null);
         array.bytesRead(data);
         return array;
     }
     switch (num2)
     {
     case 0x6a:
         {
             ErlNullList list = new ErlNullList();
             list.bytesRead(data);
             return list;
         }
     case 0x6c:
         {
             ErlList list2 = new ErlList(null);
             list2.bytesRead(data);
             return list2;
         }
     case 100:
         {
             ErlAtom atom = new ErlAtom(null);
             atom.bytesRead(data);
             return atom;
         }
     case 0x6b:
         {
             ErlString str = new ErlString(null);
             str.sampleBytesRead(data);
             return str;
         }
     case 110:
         {
             ErlLong @long = new ErlLong();
             @long.bytesRead(data);
             return @long;
         }
     case 0x6d:
         {
             ErlByteArray array2 = new ErlByteArray(null);
             array2.bytesRead(data);
             return array2;
         }
     }
     return null;
 }
Пример #2
0
 public static ErlType simpleAnalyse(ByteBuffer data)
 {
     int position = data.position;
     int num2 = data.readByte();
     data.position = position;
     switch (num2)
     {
     case 0x61:
         {
             ErlByte num3 = new ErlByte(0);
             num3.bytesRead(data);
             return num3;
         }
     case 0x6d:
         {
             ErlByteArray array = new ErlByteArray(null);
             array.simpleBytesRead(data);
             return array;
         }
     case 0x62:
         {
             ErlInt num4 = new ErlInt(0);
             num4.bytesRead(data);
             return num4;
         }
     case 0x6b:
         {
             ErlString str = new ErlString(string.Empty);
             str.bytesRead(data);
             return str;
         }
     case 110:
         {
             ErlLong @long = new ErlLong();
             @long.bytesRead(data);
             return @long;
         }
     }
     return null;
 }