com.thomsonreuters.upa.codec.Buffer.data()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中com.thomsonreuters.upa.codec.Buffer.data()方法的一些代码示例,展示了Buffer.data()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Buffer.data()方法的具体详情如下:
包路径:com.thomsonreuters.upa.codec.Buffer
类名称:Buffer
方法名:data

Buffer.data介绍

[英]Gets the underlying ByteBuffer. Do not use the position and limit from the java.nio.ByteBuffer. Use #position() and #length() from the Buffer.
[中]获取基础ByteBuffer。不要使用java中的位置和限制。尼奥。拜特伯弗。使用缓冲区中的#position()和#length()。

代码示例

代码示例来源:origin: Refinitiv/Elektron-SDK

public void initialize()
{
  _msgBuffer.data(ByteBuffer.allocate(1024));
  _textBuffer.data(ByteBuffer.allocate(256));
}

代码示例来源:origin: Refinitiv/Elektron-SDK

@Override
public int extractMsgClass()
{
  if (MSG_CLASS_POS + MSG_CLASS_SIZE > _buffer.length())
    return CodecReturnCodes.INCOMPLETE_DATA;
  int position = _buffer.data().position();
  byte msgClass = _buffer.data().get(_buffer.position() + MSG_CLASS_POS);
  _buffer.data().position(position);
  return msgClass;
}

代码示例来源:origin: Refinitiv/Elektron-SDK

@Override
public int extractStreamId()
{
  if (MSG_STREAMID_POS + MSG_STREAMID_SIZE > _buffer.length())
    return CodecReturnCodes.INCOMPLETE_DATA;
  int position = _buffer.data().position();
  int streamId = _buffer.data().getInt(_buffer.position() + MSG_STREAMID_POS);
  _buffer.data().position(position);
  return streamId;
}

代码示例来源:origin: Refinitiv/Elektron-SDK

public void dictionaryName(Buffer dictionaryName)
{
  assert (dictionaryName != null) : "dictionaryName can not be null";
  this.dictionaryName.data(dictionaryName.data(), dictionaryName.position(), dictionaryName.length());
}

代码示例来源:origin: Refinitiv/Elektron-SDK

/**
 * Sets group for this service to the user specified buffer. Data
 * and position of group buffer of this service will be set to passed in
 * buffer's data and position. Note that this creates garbage if buffer
 * is backed by String object.
 *
 * @param group the group
 */
public void group(Buffer group)
{
  this.group.data(group.data(), group.position(), group.length());
}

代码示例来源:origin: Refinitiv/Elektron-SDK

/**
 * Sets the mergedToGroup for this service to the user specified buffer.
 * Buffer used by this object's mergedToGroup field will be set to
 * passed in buffer's data and position. Note that this creates garbage
 * if buffer is backed by String object.
 *
 * @param mergedToGroup the merged to group
 */
public void mergedToGroup(Buffer mergedToGroup)
{
  this.mergedToGroup.data(mergedToGroup.data(), mergedToGroup.position(), mergedToGroup.length());
}

代码示例来源:origin: Refinitiv/Elektron-SDK

@Override
public void sourceName(Buffer sourceName)
{
  _sourceName.data(sourceName.data(), sourceName.position(), sourceName.length());
}

代码示例来源:origin: Refinitiv/Elektron-SDK

JNIChannel()
{
  // not client specified, use default from MANIFEST.MF
  _componentInfo.componentVersion().data(Transport._defaultComponentVersionBuffer, 0,
                      Transport._defaultComponentVersionBuffer.limit());
}

代码示例来源:origin: Refinitiv/Elektron-SDK

public void userName(Buffer userName)
{
  assert(userName != null) : "userName can not be null";
  userName().data(userName.data(), userName.position(), userName.length());
}

代码示例来源:origin: Refinitiv/Elektron-SDK

public void userName(Buffer userName)
{
  assert (userName != null) : "userName can not be null";
  userName().data(userName.data(), userName.position(), userName.length());
}

代码示例来源:origin: Refinitiv/Elektron-SDK

public void authenticationErrorText(Buffer authenticationErrorText)
{
  assert (checkHasAuthenticationErrorText());
  authenticationErrorText.data(authenticationErrorText.data(),
                 authenticationErrorText.position(),
                 authenticationErrorText.length());
}

代码示例来源:origin: Refinitiv/Elektron-SDK

ServerImpl(ProtocolInt transport, Pool pool)
{
  pool(pool);
  _transport = transport;
  _state = ChannelState.INACTIVE;
  _componentInfo.componentVersion().data(Transport._defaultComponentVersionBuffer, 0,
                      Transport._defaultComponentVersionBuffer.limit());
}

代码示例来源:origin: Refinitiv/Elektron-SDK

static Buffer realignBuffer(com.thomsonreuters.upa.codec.EncodeIterator eIter, int newLength)
{
  Buffer bigBuffer = CodecFactory.createBuffer();
  bigBuffer.data(ByteBuffer.allocate(newLength));
  eIter.realignBuffer(bigBuffer);
  return bigBuffer;
}

代码示例来源:origin: Refinitiv/Elektron-SDK

public void applicationId(Buffer applicationId)
{
  assert(checkHasApplicationId()) : "application id flag should be set first";
  assert (applicationId != null) : "applicationId can not be null";
  applicationId().data(applicationId.data(), applicationId.position(), applicationId.length());
}

代码示例来源:origin: Refinitiv/Elektron-SDK

@Override
public int setBufferAndRWFVersion(Buffer buffer, int rwfMajorVersion, int rwfMinorVersion)
{
  assert (buffer != null) : "buffer must be non-null";
  assert (buffer.data() != null) : "byte buffer must be non-null";
  int ret = setWriter(rwfMajorVersion, rwfMinorVersion);
  if (ret != CodecReturnCodes.SUCCESS)
    return ret;
  _clientBuffer = buffer;
  return setBuffer(buffer.data(), ((BufferImpl)buffer).position(), buffer.length());
}

代码示例来源:origin: Refinitiv/Elektron-SDK

void initConnOptsComponentInfo(ConnectOptions opts, Error error)
{
  if (opts.componentVersion() != null)
  {
    ByteBuffer connectOptsCompVerBB = ByteBuffer.wrap(opts.componentVersion().getBytes());
    _connectOptsComponentInfo = new ComponentInfoImpl();
    _connectOptsComponentInfo.componentVersion().data(connectOptsCompVerBB);
  }
}

代码示例来源:origin: Refinitiv/Elektron-SDK

@Override
public AckMsg text(String text)
{
  if (text == null)
    throw ommIUExcept().message("Passed in value is null");
  
  ((com.thomsonreuters.upa.codec.AckMsg)_rsslMsg).applyHasText();
  ((com.thomsonreuters.upa.codec.AckMsg)_rsslMsg).text().data(text);
  
  return this;
}

代码示例来源:origin: Refinitiv/Elektron-SDK

protected void positionInt(String position)
{
  _rsslLoginReq.applyHasAttrib();
  _rsslLoginReq.attrib().position().data(position);
  _rsslLoginReq.attrib().applyHasPosition();
}

代码示例来源:origin: Refinitiv/Elektron-SDK

protected void applicationIdInt(String applicationId)
{
  _rsslLoginReq.applyHasAttrib();
  _rsslLoginReq.attrib().applicationId().data(applicationId);
  _rsslLoginReq.attrib().applyHasApplicationId();
}

代码示例来源:origin: Refinitiv/Elektron-SDK

public LoginRefresh state(OmmState value)
{
  _changed = true;
  _stateSet = true;
  
  _rsslState.streamState(value.streamState());
  _rsslState.dataState(value.dataState());
  _rsslState.code(value.statusCode());
  _stateText.data(value.statusText());
  _rsslState.text(_stateText);
  
  return this;
  
}

相关文章