Java 类com.google.zxing.client.result.TextParsedResult 实例源码

项目:barterli_android    文件:TextResultHandler.java   
@Override
public CharSequence getDisplayContents() {
    TextParsedResult result = (TextParsedResult) getResult();
    StringBuilder contents = new StringBuilder(100);
    ParsedResult.maybeAppend(result.getText(), contents);
    contents.trimToSize();
    return contents.toString();
}
项目:android-quick-response-code    文件:TextResultHandler.java   
@Override
public CharSequence getDisplayContents() {
    TextParsedResult result = (TextParsedResult) getResult();
    StringBuilder contents = new StringBuilder(100);
    ParsedResult.maybeAppend(result.getText(), contents);
    contents.trimToSize();
    return contents.toString();
}
项目:BibSearch    文件:NDEFTextResultParser.java   
public static TextParsedResult parse(Result result) {
  byte[] bytes = result.getRawBytes();
  if (bytes == null) {
    return null;
  }
  NDEFRecord ndefRecord = NDEFRecord.readRecord(bytes, 0);
  if (ndefRecord == null || !ndefRecord.isMessageBegin() || !ndefRecord.isMessageEnd()) {
    return null;
  }
  if (!ndefRecord.getType().equals(NDEFRecord.TEXT_WELL_KNOWN_TYPE)) {
    return null;
  }
  String[] languageText = decodeTextPayload(ndefRecord.getPayload());
  return new TextParsedResult(languageText[0], languageText[1]);
}