Ejemplo n.º 1
0
 public int getLength() {
   try {
     return getData().getBytes(QRUtil.getJISEncoding()).length;
   } catch (UnsupportedEncodingException e) {
     throw new RuntimeException(e.getMessage());
   }
 }
Ejemplo n.º 2
0
  public void write(BitBuffer buffer) {

    try {

      byte[] data = getData().getBytes(QRUtil.getJISEncoding());

      for (int i = 0; i < data.length; i++) {
        buffer.put(data[i], 8);
      }

    } catch (UnsupportedEncodingException e) {
      throw new RuntimeException(e.getMessage());
    }
  }