/*     */   public void process(InputStream is, OutputStream os)
/*     */   {
/*  75 */     this.os = os;
/*     */     try {
/*  77 */       Document document = builder.parse(is);
/*  78 */       Msg4Head head = new Msg4Head();
/*  79 */       head.read(document);
/*  80 */       String type = head.getMsgType();
/*     */ 
/*  82 */       if ("text".equals(type)) {
/*  83 */         Msg4Text msg = new Msg4Text(head);
/*  84 */         msg.read(document);
/*  85 */         onTextMsg(msg);
/*  86 */       } else if ("image".equals(type)) {
/*  87 */         Msg4Image msg = new Msg4Image(head);
/*  88 */         msg.read(document);
/*  89 */         onImageMsg(msg);
/*  90 */       } else if ("event".equals(type)) {
/*  91 */         Msg4Event msg = new Msg4Event(head);
/*  92 */         msg.read(document);
/*  93 */         onEventMsg(msg);
/*  94 */       } else if ("link".equals(type)) {
/*  95 */         Msg4Link msg = new Msg4Link(head);
/*  96 */         msg.read(document);
/*  97 */         onLinkMsg(msg);
/*  98 */       } else if ("location".equals(type)) {
/*  99 */         Msg4Location msg = new Msg4Location(head);
/* 100 */         msg.read(document);
/* 101 */         onLocationMsg(msg);
/* 102 */       } else if ("voice".equals(type)) {
/* 103 */         Msg4Voice msg = new Msg4Voice(head);
/* 104 */         msg.read(document);
/* 105 */         onVoiceMsg(msg);
/* 106 */       } else if ("video".equals(type)) {
/* 107 */         Msg4Video msg = new Msg4Video(head);
/* 108 */         msg.read(document);
/* 109 */         onVideoMsg(msg);
/*     */       } else {
/* 111 */         onErrorMsg(-1);
/*     */       }
/*     */     } catch (SAXException e) {
/* 114 */       e.printStackTrace();
/*     */     } catch (IOException e) {
/* 116 */       e.printStackTrace();
/*     */     }
/*     */   }