Exemplo n.º 1
0
  private void decode() {
    endOfBodyPosition = buffer.getInt(BUFFER_HEADER_SPACE);

    buffer.readerIndex(endOfBodyPosition + DataConstants.SIZE_INT);

    decodeHeadersAndProperties(buffer);

    endOfMessagePosition = buffer.readerIndex();

    bufferValid = true;
  }
Exemplo n.º 2
0
  // Decode from journal or paging
  public void decode(final HornetQBuffer buff) {
    int start = buff.readerIndex();

    endOfBodyPosition = buff.readInt();

    endOfMessagePosition = buff.getInt(endOfBodyPosition - BUFFER_HEADER_SPACE + start);

    int length = endOfMessagePosition - BUFFER_HEADER_SPACE;

    buffer.setIndex(0, BUFFER_HEADER_SPACE);

    buffer.writeBytes(buff, start, length);

    decode();

    buff.readerIndex(start + length);
  }