Exemplo n.º 1
0
 private void emitDW() {
   int ln = operands.size();
   for (int i = 0; i < ln; i++) {
     Object o = operands.get(i);
     if (o instanceof Integer) {
       stream.write16(((Integer) o).intValue());
     } else if (o instanceof String) {
       byte[] bytes = ((String) o).getBytes();
       int bln = bytes.length;
       for (int j = 0; j < bln; j++) {
         stream.write8(bytes[j]);
       }
       if (bln % 2 == 1) stream.write8(0);
     } else {
       throw new IllegalArgumentException("Unknown data: " + o);
     }
   }
 }