Examples of decodePayload()


Examples of net.tomp2p.message.Decoder.decodePayload()

  public static Message decodeMessage(Buffer buf, InetSocketAddress recipient, InetSocketAddress sender, SignatureFactory signatureFactory)
          throws InvalidKeyException, NoSuchAlgorithmException, InvalidKeySpecException, SignatureException, IOException {
    Decoder d = new Decoder(signatureFactory);
    final int readerBefore = buf.buffer().readerIndex();
    d.decodeHeader(buf.buffer(), recipient, sender);
    final boolean donePayload = d.decodePayload(buf.buffer());
    d.decodeSignature(buf.buffer(), readerBefore, donePayload);
    return d.message();
  }
 
  /**
 
View Full Code Here

Examples of org.nfctools.ndef.wkt.decoder.SmartPosterRecordDecoder.decodePayload()

    SmartPosterRecordDecoder decoder = new SmartPosterRecordDecoder();

    byte[] payload = NfcUtils.convertASCIIToBin(innerSmartPoster);

    Record record = decoder.decodePayload(payload, NdefContext.getNdefMessageDecoder());
    assertTrue(record instanceof SmartPosterRecord);

    SmartPosterRecord smartPosterRecord = (SmartPosterRecord)record;

    assertEquals("Test", smartPosterRecord.getTitle().getText());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.