Package org.smpp.util

Examples of org.smpp.util.ByteBuffer.appendBuffer()


      if (pdu == null) { // only if we didn't manage to get pdu from unproc
        buffer = connection.receive();
        unprocBuffer = unprocessed.getUnprocessed();
        // if received something now or have something from the last receive
        if (buffer.length() != 0) {
          unprocBuffer.appendBuffer(buffer);
          unprocessed.setLastTimeReceived();
          pdu = tryGetUnprocessedPDU(unprocessed);
        } else {
          debug.write(DRXTXD2, "no data received this time.");
          // check if it's not too long since we received any data
View Full Code Here


    markValueSet();
  }

  protected ByteBuffer getValueData() throws ValueNotSetException {
    ByteBuffer valueBuf = new ByteBuffer();
    valueBuf.appendBuffer(getValue());
    return valueBuf;
  }

  public void setValue(ByteBuffer p_value) {
    if (p_value != null) {
View Full Code Here

  public ByteBuffer getData() throws ValueNotSetException {
    if (hasValue()) {
      ByteBuffer tlvBuf = new ByteBuffer();
      tlvBuf.appendShort(getTag());
      tlvBuf.appendShort(encodeUnsigned(getLength()));
      tlvBuf.appendBuffer(getValueData());
      return tlvBuf;
    } else {
      return null;
    }
  }
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.